diff options
Diffstat (limited to 'toys/de/de.sh')
-rw-r--r-- | toys/de/de.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/toys/de/de.sh b/toys/de/de.sh new file mode 100644 index 0000000..a75027d --- /dev/null +++ b/toys/de/de.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# XXX WORK IN PROGRESS + +usage() { + echo "$program [-h] [-tlf] [-r host[,host2]] cmd [cmdargs]" +} + +program="`basename $0`" +mode_tmux=0 +mode_less=0 +mode_file=0 +hosts="" +opts="$(getopt -o htlfr: -n "$program" -- "$@")" +err=$? +eval set -- "$opts" +while true; do case $1 in + -h) usage; exit 1 ;; + -t) mode_tmux=1; shift ;; + -l) mode_less=1; shift ;; + -f) mode_file=1; shift ;; + -r) shift; hosts="$hosts`shift`" ;; + --) shift; break ;; +esac done +[[ $err -ne 0 ]] && usage && exit 1 + +hosts=${hosts-$DE_REMOTE_HOSTS} +echo $hosts + +echo "XXX" + +#while |