diff options
author | James E.H. Turner <jturner@gemini.edu> | 2016-09-01 15:56:23 -0400 |
---|---|---|
committer | James E.H. Turner <jturner@gemini.edu> | 2016-09-01 15:56:23 -0400 |
commit | cb4ca53aea434c8fe7c4a071037a6965cb917519 (patch) | |
tree | 9ef1625616cb9cf0caebe9d8b752d085b7c6c203 | |
parent | ba84723b13f8933298b3077a284f1950c5575941 (diff) | |
download | astroconda-iraf-helpers-cb4ca53aea434c8fe7c4a071037a6965cb917519.tar.gz |
Remove extern.pkg from the build variant, so it doesn't end up in the tarball & overwrite the existing one(s)
-rwxr-xr-x | scripts/ac_build_iraf_pkg | 4 | ||||
-rwxr-xr-x | scripts/ac_update_extern_pkg | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/scripts/ac_build_iraf_pkg b/scripts/ac_build_iraf_pkg index 997e266..e5efa13 100755 --- a/scripts/ac_build_iraf_pkg +++ b/scripts/ac_build_iraf_pkg @@ -147,6 +147,10 @@ if [ -r "$pkg_omit_list" ]; then fi fi +# Remove extern.pkg from the build variant, so it doesn't end up in the +# tarball and overwrite the existing one(s): +rm -f "${PREFIX}/${extern_pkg}" "${PREFIX}/${extpkg_bak}" + # Ensure status=0 on reaching the end (& not left over from some condition). exit 0 diff --git a/scripts/ac_update_extern_pkg b/scripts/ac_update_extern_pkg index 4243e19..e6f1e60 100755 --- a/scripts/ac_update_extern_pkg +++ b/scripts/ac_update_extern_pkg @@ -15,7 +15,7 @@ from collections import OrderedDict # AstroConda naming conventions: extern_pkg = 'extern.pkg' -backup = 'extern.pkg.ac_bak' # avoid possible collision with user .bak +extpkg_bak = 'extern.pkg.ac_bak' # avoid possible collision with user .bak extern_dir = 'iraf_extern' template = 'ur_extern.pkg' path_sub = 'UR_VDIR' # a regexp @@ -153,7 +153,7 @@ else: buffer += keep_str # Back up the original extern.pkg: -shutil.copy2(extpkg_path, os.path.join(path, backup)) +shutil.copy2(extpkg_path, os.path.join(path, extpkg_bak)) # Write the modified extern.pkg: with open(extpkg_path, 'w') as extpkg_file: |