Check sanity of WORKING_DIRECTORY variable. cd into $WORKING_DIRECTORY before sourcing other scripts.

This commit is contained in:
Gerhard Hoffmann 2023-06-20 09:14:20 +02:00
parent 5bca1f498b
commit ff2ea6b8f2

View File

@ -71,6 +71,18 @@ while test $# -gt 0; do
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