Remove hardcoded DBEXT value from script
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a71f4c4c6a
commit
e0e33c329f
2 changed files with 4 additions and 3 deletions
|
@ -33,6 +33,7 @@ edit = sed \
|
||||||
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
|
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
|
||||||
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
|
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
|
||||||
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|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'
|
-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
|
## All the scripts depend on Makefile so that they are rebuilt when the
|
||||||
|
|
|
@ -155,17 +155,17 @@ if __name__ == "__main__":
|
||||||
# if the $repo var is used in the url, replace it by core
|
# if the $repo var is used in the url, replace it by core
|
||||||
tempUrl = Template(serverUrl).safe_substitute(repo='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 mirror url; it is the third (or fourth) dir
|
||||||
# from the end, where the url is http://foo/bar/REPO/os/arch
|
# from the end, where the url is http://foo/bar/REPO/os/arch
|
||||||
try:
|
try:
|
||||||
splitted2 = tempUrl.split('/')
|
splitted2 = tempUrl.split('/')
|
||||||
if tempUrl[-1] != '/':
|
if tempUrl[-1] != '/':
|
||||||
repoName = splitted2[-3]
|
repoName = splitted2[-3]
|
||||||
dbFileName = '/' + repoName + '.db.tar.gz'
|
dbFileName = '/' + repoName + '@DBEXT@'
|
||||||
else:
|
else:
|
||||||
repoName = splitted2[-4]
|
repoName = splitted2[-4]
|
||||||
dbFileName = repoName + '.db.tar.gz'
|
dbFileName = repoName + '@DBEXT@'
|
||||||
except:
|
except:
|
||||||
dbFileName = ''
|
dbFileName = ''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue