Adjust how to clear a shell script env variable
authorTodd Lyons <tlyons@exim.org>
Wed, 22 Oct 2014 18:34:07 +0000 (11:34 -0700)
committerTodd Lyons <tlyons@exim.org>
Wed, 22 Oct 2014 18:34:07 +0000 (11:34 -0700)
run_cron.sh

index 717c9706975151454b941a5f7e2aa36b8a336e46..5c81a8588d48d386ec4d4a3323c5f39f320288ec 100755 (executable)
@@ -15,6 +15,10 @@ fi
 
 # Sanitize or set up environment
 # 1) Remove because spec.txt generation fails if set
-export -n PERL_UNICODE
+if env | grep -q '/bin/bash'; then
+  export -n PERL_UNICODE
+else
+  unset PERL_UNICODE
+fi
 
 ./run_branches.pl $@