summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/up.sh15
1 files changed, 7 insertions, 8 deletions
diff --git a/bin/up.sh b/bin/up.sh
index 0ff9e69b..8b70de70 100644
--- a/bin/up.sh
+++ b/bin/up.sh
@@ -58,17 +58,16 @@ uploadTerminal() {
 	upload "${temp}/term.html"
 }
 
-args=$(setopt 'chst' "$@")
-eval set -- "$args"
-for opt; do
+while getopts 'chst' opt; do
 	case "$opt" in
-		(-c) shift; fn=uploadCommand;;
-		(-h) shift; fn=uploadHi;;
-		(-s) shift; fn=uploadScreen;;
-		(-t) shift; fn=uploadTerminal;;
-		(--) shift; break;;
+		(c) fn=uploadCommand;;
+		(h) fn=uploadHi;;
+		(s) fn=uploadScreen;;
+		(t) fn=uploadTerminal;;
+		(?) exit 1;;
 	esac
 done
+shift $(($OPTIND - 1))
 [ $# -eq 0 ] && : ${fn:=uploadText}
 : ${fn:=upload}
 
e17322b282a5e0&follow=1'>Set PS0 in cashJune McEnroe 2019-01-13Add PS0June McEnroe 2019-01-13Change default ENV from cashrc to env.shJune McEnroe 2019-01-13Use colours in cash promptsJune McEnroe 2019-01-12Set PSlit like NetBSD shJune McEnroe 2019-01-12Install gnupg2 from pkgsrc and symlink gpgJune McEnroe 2019-01-12Reference cash builtin man pages in cash.1 SEE ALSOJune McEnroe 2019-01-12Restore cash builtin man page datesJune McEnroe 2019-01-12Use local libeditJune McEnroe 2019-01-12Replace libedit MakefileJune McEnroe 2019-01-11Import /usr/src/lib/libedit from NetBSD 8.0June McEnroe 2019-01-11Add PSlit for prompt escapesJune McEnroe 2019-01-11Don't make depend automaticallyJune McEnroe