X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/cc1ae02e2ecebd5006fe481473fc1f15f92b121a..76ce8d6527ebcc7e9c73ac181f761df45cc0e1b6:/packages/termux-api/termux-vibrate diff --git a/packages/termux-api/termux-vibrate b/packages/termux-api/termux-vibrate index 8146d2f3..4c510936 100755 --- a/packages/termux-api/termux-vibrate +++ b/packages/termux-api/termux-vibrate @@ -3,17 +3,20 @@ set -e -u show_usage () { - echo 'usage: termux-vibrate []' + echo 'usage: termux-vibrate [-f,--force] []' echo 'Vibrate the device for the specified duration (default:1000 ms).' + echo 'By default no vibration is done when in silent mode - use the' + echo '-f,--force option to force vibration even when in silent mode.' exit 1 } PARAM_DURATION="" -O=`getopt -l duration: -l help -- d:h "$@"` +O=`getopt -l duration: -l force -l help -- d:fh "$@"` eval set -- "$O" while true; do case "$1" in -d|--duration) PARAM_DURATION="--ei duration_ms $2"; shift 2;; + -f|--force) PARAM_DURATION="--ez force true"; shift 1;; -h|--help) show_usage;; --) shift; break;; *) echo Error; exit 1;;