#!/bin/bash # $HeadURL$ $LastChangedRevision$ # Modules . $(miniade) || { echo "${0##*/}: ERROR: miniade failed (hint: run 'miniade' to see error)" >&2; exit 1; } # Configurable stuff # Other globals # The next line is extracted by 'adegmt -l'. After adegmt has been used to get this template the line can be removed. # ADEGMT-LIST-HINT: MINIADE-based bash script implementing lx(1) main() { local MY_ARGS # Defaults for options TARGET=0 # Process options special_opts_handler() { case $1 in -b) TARGET=0 ;; -i) TARGET=1 ;; -w) TARGET=2 ;; *) return 1 ;; esac } miniade_process_options --help-handler=help --special-opts-handler=special_opts_handler MY_ARGS "$@" && set -- "${MY_ARGS[@]}" # Process arguments [ $# = 1 ] || miniade_bad_usage LABEL="$1" # Sanity checks and derivations # Guts echo -e -n "\e]$TARGET;$LABEL\a" } help() { local PROGNAME miniade_get_progname PROGNAME echo "Usage: $PROGNAME [ ] [ -i | -w | -b ]