Merge pull request #68 from Newbytee/no-args-patch

build.sh: Show usage help when no arguments are passed
pull/79/head
flightlessmango 4 years ago committed by GitHub
commit d7a4675724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -177,6 +177,15 @@ uninstall() {
rm -fv "/usr/bin/mangohud.x86"
}
usage() {
if test -z $1; then
echo "Unrecognized command argument: $a"
else
echo "$0 requires one argument"
fi
echo 'Accepted arguments: "pull", "configure", "build", "package", "install", "clean", "uninstall".'
}
for a in $@; do
case $a in
"") build;;
@ -189,7 +198,11 @@ for a in $@; do
"uninstall") uninstall;;
"release") release;;
*)
echo "Unrecognized command argument: $a"
echo 'Accepted arguments: "pull", "configure", "build", "package", "install", "clean", "uninstall".'
usage
esac
done
if [[ -z $@ ]]; then
usage no-args
fi

Loading…
Cancel
Save