diff --git a/bin/git-touch b/bin/git-touch index 25627f7c5..05b715880 100755 --- a/bin/git-touch +++ b/bin/git-touch @@ -1,8 +1,13 @@ #!/usr/bin/env bash -filename="$*" +USAGE(){ + echo "git touch [ . . .]" 1>&2 + exit 1 +} -test -z "$filename" && echo "filename required" 1>&2 && exit 1 +test $# -lt 1 && USAGE -touch "$filename" \ - && git add "$filename" +for filename in $@; do + touch "$filename" \ + && git add "$filename" +done