From be5cecfe4c8bc6ddf1acdb230033449706d644cb Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 17 Jun 2012 13:24:41 +0200 Subject: [PATCH] build.py: fix symlinks --- tools/build/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/build/build.py b/tools/build/build.py index f11836ca..33cf02b8 100755 --- a/tools/build/build.py +++ b/tools/build/build.py @@ -203,11 +203,11 @@ def build_oxjs(downloads=False, geo=False): # source source_file = download_path + 'OxJS.%s.source.tar.gz' % version data['size']['source'] = write_tarfile(source_file, root_path, 'OxJS', filter_source) - write_link(source_file, source_file.replace(version, 'latest')) + write_link(source_file.replace(download_path, ''), source_file.replace(version, 'latest')) # build build_file = download_path + 'OxJS.%s.build.tar.gz' % version data['size']['build'] = write_tarfile(build_file, root_path, 'OxJS', filter_build) - write_link(build_file, build_file.replace(version, 'latest')) + write_link(build_file.replace(download_path, ''), build_file.replace(version, 'latest')) # json write_file(download_path + 'downloads.json', json.dumps(data, indent=4, sort_keys=True)) @@ -253,7 +253,7 @@ def write_file(file, data): def write_link(source, target): print 'linking', source, 'to', target write_path(target) - if os.path.exists(target): + if os.path.lexists(target): os.unlink(target) os.symlink(source, target)