Add error handling: exit if cd fails

This commit is contained in:
practicalswift
2017-10-04 21:19:45 +02:00
parent b9e79ab415
commit 1e44ae0e19
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ if [ ! -d "$WORKINGDIR" ]; then
mkdir "$WORKINGDIR"
fi
cd "$WORKINGDIR"
cd "$WORKINGDIR" || exit 1
#test if a version number has been passed as an argument
if [ -n "$1" ]; then