summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-11-23 00:12:05 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-11-23 00:12:05 -0500
commit1fc3ca62eeb334f55fc1ac6503df00f7e06edbb1 (patch)
treeca1853072a5c8cd87764f7796861c2c3c9821cdf /scripts
parent7e38e6d48957f60feaddda9a3eaf31d12b5b8548 (diff)
Make the instance name and domain configurable.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkpkglists.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/mkpkglists.py b/scripts/mkpkglists.py
index a6f8a19..291b82e 100755
--- a/scripts/mkpkglists.py
+++ b/scripts/mkpkglists.py
@@ -11,6 +11,8 @@ docroot = os.path.dirname(os.path.realpath(__file__)) + "/../web/html/"
config = configparser.RawConfigParser()
config.read(os.path.dirname(os.path.realpath(__file__)) + "/../conf/config")
+branding_name = config.get('options', 'branding_shortname');
+
aur_db_host = config.get('database', 'host')
aur_db_name = config.get('database', 'name')
aur_db_user = config.get('database', 'user')
@@ -23,8 +25,8 @@ db = mysql.connector.connect(host=aur_db_host, user=aur_db_user,
cur = db.cursor()
datestr = datetime.datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")
-pkglist_header = "# AUR package list, generated on " + datestr
-pkgbaselist_header = "# AUR package base list, generated on " + datestr
+pkglist_header = "# " + branding_name + " package list, generated on " + datestr
+pkgbaselist_header = "# " + branding_name + " package base list, generated on " + datestr
with gzip.open(docroot + "packages.gz", "w") as f:
f.write(bytes(pkglist_header + "\n", "UTF-8"))