termux-api: Add termux-vibrate -f/--force option
[termux-packages] / packages / termux-api / termux-toast
CommitLineData
cc1ae02e 1#!/bin/sh
17d445b3
FF
2
3show_usage () {
4 echo "usage: termux-toast [-s|--short]"
5 echo "Show the text from stdin in a Toast (a transient popup). Options:"
6 echo " -s, --short only show the toast for a short while"
7}
8
9PARAMS=""
10O=`busybox getopt -q -l short -l help -- sh "$@"`
11if [ $? != 0 ] ; then show_usage; exit 1 ; fi
12eval set -- "$O"
13while true; do
14case "$1" in
15 -s|--short) PARAMS="$PARAMS --ez short true"; shift 1;;
16 -h|--help) show_usage; exit 0;;
17 --) shift; break;;
18 *) echo Error; exit 1;;
19esac
20done
21
22if [ $# != 0 ]; then show_usage; exit 1; fi
23
cc1ae02e 24@TERMUX_API@ Toast $PARAMS