X-Git-Url: https://git.distorted.org.uk/~mdw/ircbot/blobdiff_plain/5ae6ea62bd816669b9affa540df24b77f18b2f13..df78d81f28510c951776e27561042103ac8bfdb6:/on-vc.sh diff --git a/on-vc.sh b/on-vc.sh index e68d1a7..e560ed4 100755 --- a/on-vc.sh +++ b/on-vc.sh @@ -13,12 +13,13 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin fail () { echo 2>&1 "$0: $1"; exit 1; } -test $# = 2 || fail "usage: $0 VC SCRIPT" +test $# -ge 2 || fail "usage: $0 VC SCRIPT [ARGS]" vc="$1" script="$2" +shift; shift cd "$(dirname $0)" test -L .tclshrc || fail "no .tclshrc symlink" test -x "./$script" || fail "script not executable" -openvt -f -c "$vc" -w -- screen ./"$script" +openvt -f -c "$vc" -w -- screen ./"$script" "$@"