diff --git a/startvnc b/startvnc new file mode 100755 index 0000000..93e8276 --- /dev/null +++ b/startvnc @@ -0,0 +1,40 @@ +#!/bin/bash + +OPTS=`getopt -o hn:c:p: --long help,name:,color:,port: -n 'parse-options' -- "$@"` + +if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi + +eval set -- "$OPTS" + +HELP=false +NAME=$(hostname) +COLOR="837642" +PORT=63 + +while true; do + case "$1" in + -h | --help ) HELP=true; shift ;; + -n | --name ) NAME="$2"; shift; shift ;; + -c | --color ) COLOR="$2"; shift; shift ;; + -p | --port ) PORT="$2"; shift; shift ;; + -- ) shift; break ;; + * ) break ;; + esac +done + +if ${HELP}; then + cat <