File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ usage() {
2727 -h Show this help output
2828 -V Show version information
2929 EOF
30- exit ${1:- 0}
3130}
3231
3332version () {
@@ -296,21 +295,24 @@ while getopts haxVR:l-: OPT ; do
296295 case ${OPT} in
297296 a) SHOW_ALL=true;;
298297 x) SET_X=true;;
299- h) usage;;
298+ h) usage; exit 0; ;
300299 V) version;;
301300 R) ROOT=" ${OPTARG%/ } /" ;;
302301 l) LIST=true;;
303302 -) # Long opts ftw.
304303 case ${OPTARG} in
305304 no-auto-root) AUTO_ROOT=false;;
306- * ) usage 1;;
305+ * ) usage >&2 ; exit 1;;
307306 esac
308307 ;;
309- ? ) usage 1;;
308+ ? ) usage >&2 ; exit 1;;
310309 esac
311310done
312311shift $(( $OPTIND - 1 ))
313- [ -z " $1 " ] && usage 1
312+ if [ -z " $1 " ]; then
313+ usage >&2
314+ exit 1
315+ fi
314316
315317${SET_X} && set -x
316318
You can’t perform that action at this time.
0 commit comments