Show the command's usage when no arguments are provided.
This commit is contained in:
parent
69a50e1e79
commit
0049899c86
@ -24,8 +24,9 @@ newArgs() {
|
||||
fi
|
||||
}
|
||||
|
||||
for it in "$@"
|
||||
do
|
||||
if [ "$#" != 0 ]; then
|
||||
for it in "$@"
|
||||
do
|
||||
case "$it" in
|
||||
-h | --help )
|
||||
echo "Usage:"
|
||||
@ -41,7 +42,10 @@ do
|
||||
* )
|
||||
usage ;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
else
|
||||
usage
|
||||
fi
|
||||
|
||||
runIt() { eval "$1" " $args"; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user