-while getopts :hc:i:t:u: option
-do
- case "$option" in
- h) show_usage;;
- c) ARG_C="--es content"; OPT_C="$OPTARG"; CONTENT_OR_TITLE_SET=yes;;
- i) ARG_I="--es id"; OPT_I="$OPTARG";;
- t) ARG_T="--es title"; OPT_T="$OPTARG"; CONTENT_OR_TITLE_SET=yes;;
- u) ARG_U="--es url"; OPT_U="$OPTARG";;
- ?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
+TEMP=`busybox getopt \
+ -n $SCRIPTNAME \
+ -o hc:i:t: \
+ --long action:,\
+button1:,button1-action:,\
+button2:,button2-action:,\
+button3:,button3-action:,\
+content:,help,id:,\
+led-color:,led-on:,led-off:,\
+priority:,sound,title:,vibrate: \
+ -s bash \
+ -- "$@"`
+eval set -- "$TEMP"
+
+while true; do
+ case "$1" in
+ --action) OPT_ACTION="$2"; shift 2;;
+ --button1) OPT_BUTTON1_TEXT="$2"; shift 2;;
+ --button1-action) OPT_BUTTON1_ACTION="$2"; shift 2;;
+ --button2) OPT_BUTTON2_TEXT="$2"; shift 2;;
+ --button2-action) OPT_BUTTON2_ACTION="$2"; shift 2;;
+ --button3) OPT_BUTTON3_TEXT="$2"; shift 2;;
+ --button3-action) OPT_BUTTON3_ACTION="$2"; shift 2;;
+ -c | --content) OPT_CONTENT="$2"; shift 2;;
+ -h | --help) show_usage;;
+ -i | --id) OPT_ID="$2"; shift 2;;
+ --led-color) OPT_LED_COLOR="$2"; shift 2;;
+ --led-on) OPT_LED_ON="$2"; shift 2;;
+ --led-off) OPT_LED_OFF="$2"; shift 2;;
+ --priority) OPT_PRIORITY="$2"; shift 2;;
+ --sound) OPT_SOUND="true"; shift 1;;
+ -t | --title) OPT_TITLE="$2"; shift 2;;
+ --vibrate) OPT_VIBRATE="$2"; shift 2;;
+ --) shift; break ;;