From f0dbaec09c2e4b4d0544e055311c1ed4bb7ec214 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 2 Nov 2012 22:33:00 +0000 Subject: use relative links in latest listing to ease portability svn path=/trunk/; revision=16523 --- scripts/auto-build/create-latest-build-listing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/auto-build') diff --git a/scripts/auto-build/create-latest-build-listing.py b/scripts/auto-build/create-latest-build-listing.py index e38d0baf..2aa417d6 100755 --- a/scripts/auto-build/create-latest-build-listing.py +++ b/scripts/auto-build/create-latest-build-listing.py @@ -12,12 +12,12 @@ for root, dirs, files in os.walk('/var/www/auto-build/'): if 'latest' in dirs: dirs.remove('latest') for name in files: + relativeroot = re.sub('/var/www/auto-build', '..', root) m = re.search('^Pd-[01]\.[0-9][0-9].*[^5]$', name) if m: commonbuildname = re.sub('-20[01][0-9][01][0-9][0-9][0-9]', '', name) commonbuildpath = os.path.join('/var/www/auto-build/latest', commonbuildname) - buildtarball = os.path.join(root, m.string) - #print "link: ", buildtarball, commonbuildpath + buildtarball = os.path.join(relativeroot, m.string) try: os.symlink(buildtarball, commonbuildpath) except OSError, e: @@ -32,6 +32,7 @@ for root, dirs, files in os.walk('/var/www/auto-build/'): if len(sourcetarballs) > 0: sourcetarball = sourcetarballs[-1] linkname = re.sub('/20[01][0-9]-[01][0-9]-[0-9][0-9]/', '/latest/', sourcetarball) + sourcetarball = re.sub('/var/www/auto-build', '..', sourcetarball) debiantarball = re.sub('-source', '-source.debian', sourcetarball) debianlinkname = re.sub('-source', '-source.debian', linkname) try: -- cgit v1.2.1