chiark / gitweb /
not all UNIX `echo` commands support -n
authorHans-Christoph Steiner <hans@eds.org>
Mon, 14 Mar 2016 10:33:07 +0000 (11:33 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 14 Mar 2016 11:49:38 +0000 (12:49 +0100)
FreeBSD and OSX's does not, for example, and the shell should just treat
the '\n' as white space in the command line.

hooks/pre-commit

index f0e4d657d4b92f40294154a6b27d2d6b48e800eb..0f083d00f3f397d6b50d47a86fc8829a479465f6 100755 (executable)
@@ -75,7 +75,7 @@ find_command() {
        for suff in "3" "-python3" ""; do
                cmd=${1}${suff}
                if cmd_exists $cmd; then
-                       echo -n $cmd
+                       echo $cmd
                        return 0
                fi
        done