exit on unsupported flags
This commit is contained in:
parent
c1d456d6eb
commit
ee7898c5ee
1 changed files with 4 additions and 4 deletions
8
gis
8
gis
|
|
@ -23,7 +23,7 @@ OPTIONS
|
||||||
in PATHS
|
in PATHS
|
||||||
-h, --help Show this help message and exit
|
-h, --help Show this help message and exit
|
||||||
EOF
|
EOF
|
||||||
exit
|
exit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
|
|
@ -40,11 +40,11 @@ while (( "$#" )); do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
print_usage
|
print_usage 0
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "${text_bold}${text_red}Unsupported flag${text_reset} $1"
|
echo -e "${text_bold}${text_red}Unsupported flag${text_reset} $1\n"
|
||||||
shift
|
print_usage 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
paths+=("$(realpath "$1")")
|
paths+=("$(realpath "$1")")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue