diff options
author | James Turner <jturner@gemini.edu> | 2017-03-22 12:05:43 -0400 |
---|---|---|
committer | James Turner <jturner@gemini.edu> | 2017-03-22 12:05:43 -0400 |
commit | 19236000e3688a8dc93a898a38860dbc95c7e556 (patch) | |
tree | dbbac3f641d15cade2df5fa63c212f731c8e707c | |
parent | 1fe6cbc2fd520fc854510fb866dabe11bd426f14 (diff) | |
download | astroconda-iraf-helpers-19236000e3688a8dc93a898a38860dbc95c7e556.tar.gz |
Report only failure, not success, to avoid a long string of "updated extern.pkg" lines when installing iraf-all etc.
-rwxr-xr-x | scripts/ac_config_iraf_pkg | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/scripts/ac_config_iraf_pkg b/scripts/ac_config_iraf_pkg index f41f943..ceb0ea1 100755 --- a/scripts/ac_config_iraf_pkg +++ b/scripts/ac_config_iraf_pkg @@ -52,9 +52,6 @@ if [ -z "$PREFIX" ]; then echo "ERROR: conda environment not configured (source activate?)" >&2 exit 1 fi - inst=0 # report success to user -else - inst=1 # report success to "conda install" via hidden file convention fi if [ ! -d "$PREFIX" -o ! -w "$PREFIX" ]; then echo "ERROR: cannot write to directory $PREFIX" >&2 @@ -71,15 +68,9 @@ umask 022 # depending on other packages. Both the LSB and MacOS define Python in /usr/bin # as standard, avoiding any dependence on the state of the installation. -if /usr/bin/python "$script_dir/ac_update_extern_pkg" $flags "$PREFIX" "$name" -then - if [ $inst = 1 ]; then - echo "Updated extern.pkg file" >> "$PREFIX/.messages.txt" - else - echo "Updated extern.pkg file" - fi -else - echo "ERROR: failed to update extern.pkg" >&2 +if ! /usr/bin/python "$script_dir/ac_update_extern_pkg" $flags \ + "$PREFIX" "$name"; then + echo "ERROR: failed to update extern.pkg for $name" >&2 exit 1 fi |