From c6267a7306cdd69ab13cd8f24414113a655341c8 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 22 Feb 2018 16:06:34 -0500 Subject: Rename command to ssh-command --- .gitignore | 2 +- Makefile | 6 +++--- command.sh | 9 --------- ssh-command.sh | 9 +++++++++ 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 command.sh create mode 100644 ssh-command.sh diff --git a/.gitignore b/.gitignore index 4a491e1..58393ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ broadcast chroot.tar -command ingest root +ssh-command tags view diff --git a/Makefile b/Makefile index 86e09de..e45a101 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -BINS = broadcast command ingest view +BINS = broadcast ingest ssh-command view USER = stream CFLAGS += -Wall -Wextra -Wpedantic @@ -9,7 +9,7 @@ all: tags $(BINS) tags: *.c ctags -w *.c -chroot.tar: command ingest view +chroot.tar: ingest ssh-command view mkdir -p root install -d -o root -g wheel \ root/bin \ @@ -29,7 +29,7 @@ chroot.tar: command ingest view root/lib install -o root -g wheel -m 444 /usr/share/misc/termcap.db root/usr/share/misc install -o root -g wheel -m 555 /bin/sh root/bin - install -o root -g wheel -m 555 command ingest view root/bin + install -o root -g wheel -m 555 ingest ssh-command view root/bin tar -c -f chroot.tar -C root bin home lib libexec usr clean: diff --git a/command.sh b/command.sh deleted file mode 100644 index 333ca44..0000000 --- a/command.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -set -e -u - -set $SSH_ORIGINAL_COMMAND -case $1 in - view) exec view public/${2##*/} ;; - ingest) exec ingest private/${2##*/} ;; - *) exec view public/${1##*/} ;; -esac diff --git a/ssh-command.sh b/ssh-command.sh new file mode 100644 index 0000000..333ca44 --- /dev/null +++ b/ssh-command.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -e -u + +set $SSH_ORIGINAL_COMMAND +case $1 in + view) exec view public/${2##*/} ;; + ingest) exec ingest private/${2##*/} ;; + *) exec view public/${1##*/} ;; +esac -- cgit 1.4.1 &showmsg=1&follow=1'>root/home/.inputrc (unfollow)
Commit message (Collapse)Author
2018-08-16Install mksh rather than zshJune McEnroe
2018-08-16Port all scripts to shJune McEnroe
Not hard, but having to escape ( ) inside [ ] had me confused for a bit.
2018-08-16Shorten .local ssh namesJune McEnroe
ksh doesn't do sophisticated tab-complete so I have to actually type ssh hosts now.
2018-08-16Export GPG_TTYJune McEnroe
Oops.
2018-08-16Disable visual bell entirely in TerminalJune McEnroe
You can't turn off bell in ksh.
2018-08-16Rearrange kshrc, fix right promptJune McEnroe