diff --git a/update_psa b/update_psa index 75a34b6..cb6c10f 100755 --- a/update_psa +++ b/update_psa @@ -70,7 +70,19 @@ while test $# -gt 0; do esac shift done - + +if [ -z "$WORKING_DIRECTORY" ]; then + echo "WORKING_DIRECTORY empty. exiting..." + exit 1 +fi + +if [ ! -d "$WORKING_DIRECTORY" ]; then + echo "WORKING_DIRECTORY $WORKING_DIRECTORY does not exist! exiting..." + exit 1 +fi + +cd "$WORKING_DIRECTORY" + source ./update_psa_impl if read_config; then