]> git.wh0rd.org - home.git/commitdiff
diff-highlight: use copy in $PATH if available
authorMike Frysinger <vapier@gentoo.org>
Thu, 21 Oct 2021 06:20:17 +0000 (02:20 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 21 Oct 2021 06:20:17 +0000 (02:20 -0400)
.bin/diff-highlight

index 940d802c94eefe9a77a3e2e680af279c2befcd91..accf635984869ff2c54800d3f0600100897b82d5 100755 (executable)
@@ -24,6 +24,8 @@ main() {
        # If we've already bootstrapped, use it.
        if [ -x "${TARGET}" ] ; then
                exec "${TARGET}" "$@"
+       elif [ -x "/usr/bin/diff-highlight" ] ; then
+               exec /usr/bin/diff-highlight "$@"
        else
                # Fallback so .gitconfig setings always work.
                exec cat