]> git.wh0rd.org Git - home.git/commitdiff
vapier-diff: add a common diff program to handle my prefs
authorMike Frysinger <vapier@gentoo.org>
Fri, 14 Dec 2018 21:11:03 +0000 (16:11 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 14 Dec 2018 21:12:29 +0000 (16:12 -0500)
.bin/backup-dvd
.bin/vapier-diff [new file with mode: 0755]
.profile.d/google.sh
.subversion/config
.subversion/diff [deleted file]

index 16cb052ed7a6b1d51fc0dc78e90bd5f6c0c01f13..d5b9d79ddb0fc2b7a43d6ac44a565d1e5df9f252 100755 (executable)
@@ -188,7 +188,7 @@ check_changes() {
        local file=$1
        ./ifodump -f "${file}.bak" > "${file}.bak.dmp"
        ./ifodump -f "${file}" > "${file}.dmp"
-       diff -u "${file}.bak.dmp" "${file}.dmp" | sed -e 1d -e 2d > "${file}.diff"
+       vapier-diff "${file}.bak.dmp" "${file}.dmp" | sed -e 1d -e 2d > "${file}.diff"
        local out=$(
                grep '^[+-]' "${file}.diff" | \
                        grep -v \
diff --git a/.bin/vapier-diff b/.bin/vapier-diff
new file mode 100755 (executable)
index 0000000..9a4c747
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Since `diff` doesn't offer a ~/.config file, wrap it.
+# Color palette kept in sync with ~/.gitconfig.
+exec diff \
+       --color \
+       --palette="ad=1;32:de=1;31:hd=35:ln=1;33" \
+       -Nup \
+       "$@"
index e44e506d4f3fff9b60b20828f48f9e42c5c3f591..45d300f732ab96240ecec6c5c59339c763892e2a 100644 (file)
@@ -12,5 +12,7 @@ fi
 
 export CROSTOOLS_SKIP_SYNC="true"
 export CROSTOOLS_GSUTIL="gsutil"
+export P4DIFF="vapier-diff"
+export G4MULTIDIFF="0"
 export P4DIFFOPTS="-du"
 export ANDROID_USE_AMAKE="true"
index 620069f725abceb8d0abf82fdf4323a19a3d13c0..0bf2d6d2aa8b63d229206e6bbd2d79d031df3ab5 100644 (file)
@@ -29,7 +29,7 @@
 ###   This will override the compile-time default, which is to use
 ###   Subversion's internal diff implementation.
 # diff-cmd = diff_program (diff, gdiff, etc.)
-diff-cmd = /home/vapier/.subversion/diff
+diff-cmd = vapier-diff
 ### Set diff3-cmd to the absolute path of your 'diff3' program.
 ###   This will override the compile-time default, which is to use
 ###   Subversion's internal diff3 implementation.
diff --git a/.subversion/diff b/.subversion/diff
deleted file mode 100755 (executable)
index fdc11ba..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec diff -Nurp "$@"