diff options
Diffstat (limited to 'acid/cyche-source')
-rwxr-xr-x | acid/cyche-source | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/acid/cyche-source b/acid/cyche-source index ee4caca..7dca756 100755 --- a/acid/cyche-source +++ b/acid/cyche-source @@ -25,6 +25,12 @@ gethash() { cd '/services' +# For <name>, limit to a-z, 0-9, -, _ +if ! echo "$1" | grep -Eq '^[-_a-z0-9]*$'; then + echo "Bad service name: $1" >&2 + exit 2 +fi + if ! [ -d "$1" ]; then git clone "$2" "$1" >&2 || exit 2 touch "$1/.git/previous_hash" |