diff --git a/build_tools/osx_package_scripts/add-shell b/build_tools/osx_package_scripts/add-shell index 3544ebfc6..d12fc0620 100755 --- a/build_tools/osx_package_scripts/add-shell +++ b/build_tools/osx_package_scripts/add-shell @@ -21,7 +21,7 @@ tmpfile=${file}.tmp set -o noclobber trap "rm -f $tmpfile" EXIT - + if ! cat $file > $tmpfile then cat 1>&2 <> "$tmpfile" +fi + for i do - if ! grep -q "^${i}$" $tmpfile + if ! grep -q "^${i}$" "$tmpfile" then - echo $i >> $tmpfile + echo $i >> "$tmpfile" fi done