Made the script exit if the -h,-?,--help flag was given
This commit is contained in:
parent
116eb0613b
commit
aca6a6902b
@ -167,7 +167,7 @@ get_brightness () {
|
|||||||
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat << EOF
|
cat <<EOF
|
||||||
brightctl - A configurable bash script that makes your life easier in controlling the brightness of your screen and
|
brightctl - A configurable bash script that makes your life easier in controlling the brightness of your screen and
|
||||||
notifying it at the same time.
|
notifying it at the same time.
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then #if '__name__' == '__main__'
|
|||||||
-h|-\?|--help)
|
-h|-\?|--help)
|
||||||
verbose && echo "Detected -h, -? or --help"
|
verbose && echo "Detected -h, -? or --help"
|
||||||
usage
|
usage
|
||||||
shift
|
exit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user