diff options
author | Wynn Wolf Arbor | 2020-05-27 21:43:53 +0200 |
---|---|---|
committer | Wynn Wolf Arbor | 2020-05-27 21:43:53 +0200 |
commit | 3bd87dc46ff202ee3d37e9d5e3e0c5ebfe504bba (patch) | |
tree | 0ee8154affda57da52cfd86200c5ccc5095870ca /cgit-chroot | |
parent | e7b2b04c7090a81d00ed39b255b00ff7f55a3ad0 (diff) | |
download | skein-3bd87dc46ff202ee3d37e9d5e3e0c5ebfe504bba.tar.gz |
cgit-chroot: Add usage
Diffstat (limited to '')
-rwxr-xr-x | cgit-chroot | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cgit-chroot b/cgit-chroot index 1828ee5..5d229db 100755 --- a/cgit-chroot +++ b/cgit-chroot @@ -5,6 +5,11 @@ set -e CGIT_CHROOT=${CGIT_CHROOT:-/srv/cgit} CGIT_GIT_ROOT=${CGIT_GIT_ROOT:-/srv/git} +usage() { + printf 'usage: cgit-chroot setup|teardown\n' >&2 + exit 1 +} + log() { printf ' %s %s\n' "$1" "$2" } @@ -63,9 +68,10 @@ teardown() { done } -test $# -eq 1 || exit 1 +test $# -eq 1 || usage case $1 in setup) setup;; teardown) teardown;; + *) usage;; esac |