Browse Source

Print which option is invalid in shell scripts

master
Kristaps Kaupe 4 years ago
parent
commit
308f739467
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 3
      install.sh
  2. 3
      test/run_tests.sh

3
install.sh

@ -393,6 +393,9 @@ parse_flags ()
break break
;; ;;
*) *)
if [[ $1 != '-h' ]] && [[ $1 != '--help' ]]; then
echo "Invalid option $1"
fi
echo " echo "
Usage: "${0}" [options] Usage: "${0}" [options]

3
test/run_tests.sh

@ -122,6 +122,9 @@ parse_flags ()
break break
;; ;;
*) *)
if [[ $1 != '-h' ]] && [[ $1 != '--help' ]]; then
echo "Invalid option $1"
fi
echo " echo "
Usage: "${0}" [options] Usage: "${0}" [options]

Loading…
Cancel
Save