diff options
author | Dan McGee <dan@archlinux.org> | 2008-01-05 22:00:21 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-01-06 09:44:28 -0600 |
commit | e0e33c329ff249d7862a0e7ec508794faa98efd8 (patch) | |
tree | a8858d1d624528010c576f2f9693ed937b328e78 | |
parent | a71f4c4c6a7775503b29ab856f8a5ce2801f2967 (diff) |
Remove hardcoded DBEXT value from script
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | scripts/Makefile.am | 1 | ||||
-rw-r--r-- | scripts/rankmirrors.py.in | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 175ddd17..2d682efe 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -33,6 +33,7 @@ edit = sed \ -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ + -e 's|@DBEXT[@]|$(DBEXT)|g' \ -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' ## All the scripts depend on Makefile so that they are rebuilt when the diff --git a/scripts/rankmirrors.py.in b/scripts/rankmirrors.py.in index 59b9c82c..99ec3fc7 100644 --- a/scripts/rankmirrors.py.in +++ b/scripts/rankmirrors.py.in @@ -155,17 +155,17 @@ if __name__ == "__main__": # if the $repo var is used in the url, replace it by core tempUrl = Template(serverUrl).safe_substitute(repo='core') - # add *.db.tar.gz to server name. the repo name is parsed + # add @DBEXT@ to server name. the repo name is parsed # from the mirror url; it is the third (or fourth) dir # from the end, where the url is http://foo/bar/REPO/os/arch try: splitted2 = tempUrl.split('/') if tempUrl[-1] != '/': repoName = splitted2[-3] - dbFileName = '/' + repoName + '.db.tar.gz' + dbFileName = '/' + repoName + '@DBEXT@' else: repoName = splitted2[-4] - dbFileName = repoName + '.db.tar.gz' + dbFileName = repoName + '@DBEXT@' except: dbFileName = '' |