From 58542b1affb49206ecb8746dfa822dba232931a2 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Tue, 9 Jul 2019 23:35:52 -0400 Subject: Add up -c --- bin/up.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bin/up.sh') diff --git a/bin/up.sh b/bin/up.sh index 07a0b76b..ef3ff6c7 100644 --- a/bin/up.sh +++ b/bin/up.sh @@ -25,6 +25,13 @@ uploadText() { upload "${temp}/input.txt" } +uploadCommand() { + temp + echo "$ $*" > "${temp}/exec.txt" + "$@" >> "${temp}/exec.txt" + upload "${temp}/exec.txt" +} + uploadHi() { temp hi -f html -o document,anchor,tab=4 "$@" > "${temp}/hi.html" @@ -38,10 +45,11 @@ uploadScreen() { upload "${temp}/capture.png" } -args=$(setopt 'hs' "$@") +args=$(setopt 'chs' "$@") eval set -- "$args" for opt; do case "$opt" in + (-c) shift; fn=uploadCommand;; (-h) shift; fn=uploadHi;; (-s) shift; fn=uploadScreen;; (--) shift; break;; -- cgit 1.4.1