Made the script exit if the -h,-?,--help flag was given

This commit is contained in:
Karma Riuk 2021-09-19 16:50:09 +02:00
parent 116eb0613b
commit aca6a6902b

View File

@ -167,7 +167,7 @@ get_brightness () {
usage() {
cat << EOF
cat <<EOF
brightctl - A configurable bash script that makes your life easier in controlling the brightness of your screen and
notifying it at the same time.
@ -209,7 +209,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then #if '__name__' == '__main__'
-h|-\?|--help)
verbose && echo "Detected -h, -? or --help"
usage
shift
exit
;;
esac
done