fix empty paths
This commit is contained in:
parent
c15b0eda2e
commit
507f9426a4
1 changed files with 8 additions and 6 deletions
14
gis
14
gis
|
|
@ -45,12 +45,14 @@ while (( "$#" )); do
|
|||
done
|
||||
|
||||
# Add $GIS_PATH or current work directory to paths if none is given
|
||||
if [ "$GIS_PATH" ]; then
|
||||
OLDIFS=$IFS
|
||||
IFS=":" read -r -a paths <<< "$GIS_PATH"
|
||||
IFS=$OLDIFS
|
||||
elif [ "${paths[*]}" == "" ]; then
|
||||
paths=("$(pwd)")
|
||||
if [ "${paths[*]}" == "" ]; then
|
||||
if [ "$GIS_PATH" ]; then
|
||||
OLDIFS=$IFS
|
||||
IFS=":" read -r -a paths <<< "$GIS_PATH"
|
||||
IFS=$OLDIFS
|
||||
else
|
||||
paths=("$(pwd)")
|
||||
fi
|
||||
fi
|
||||
|
||||
# Find Git repositories
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue