Relax #! format check

This commit is contained in:
spacewander 2016-11-01 10:22:45 +08:00
parent db62a6d95c
commit c8142ca539

View file

@ -15,7 +15,7 @@ check_bash_script() {
|| err "Run 'chmod +x bin/$cmd' to make it executable"
shebang=$(head -n1 "bin/$cmd")
test "$shebang" == "#!/usr/bin/env bash" \
[[ "$shebang" =~ \#![[:space:]]*/usr/bin/env[[:space:]]+bash ]] \
|| err "Start git-$1 with '#!/usr/bin/env bash'"
}