fix empty paths

This commit is contained in:
Denis Lehmann 2023-09-19 15:11:40 +02:00
parent c15b0eda2e
commit 507f9426a4

14
gis
View file

@ -45,12 +45,14 @@ while (( "$#" )); do
done done
# Add $GIS_PATH or current work directory to paths if none is given # Add $GIS_PATH or current work directory to paths if none is given
if [ "$GIS_PATH" ]; then if [ "${paths[*]}" == "" ]; then
OLDIFS=$IFS if [ "$GIS_PATH" ]; then
IFS=":" read -r -a paths <<< "$GIS_PATH" OLDIFS=$IFS
IFS=$OLDIFS IFS=":" read -r -a paths <<< "$GIS_PATH"
elif [ "${paths[*]}" == "" ]; then IFS=$OLDIFS
paths=("$(pwd)") else
paths=("$(pwd)")
fi
fi fi
# Find Git repositories # Find Git repositories