From 37ae4bcb04603027b1dd9bf4deb2ddfd61853dea Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 14 Dec 2018 16:11:03 -0500 Subject: [PATCH] vapier-diff: add a common diff program to handle my prefs --- .bin/backup-dvd | 2 +- .bin/vapier-diff | 8 ++++++++ .profile.d/google.sh | 2 ++ .subversion/config | 2 +- .subversion/diff | 2 -- 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 .bin/vapier-diff delete mode 100755 .subversion/diff diff --git a/.bin/backup-dvd b/.bin/backup-dvd index 16cb052..d5b9d79 100755 --- a/.bin/backup-dvd +++ b/.bin/backup-dvd @@ -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 index 0000000..9a4c747 --- /dev/null +++ b/.bin/vapier-diff @@ -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 \ + "$@" diff --git a/.profile.d/google.sh b/.profile.d/google.sh index e44e506..45d300f 100644 --- a/.profile.d/google.sh +++ b/.profile.d/google.sh @@ -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" diff --git a/.subversion/config b/.subversion/config index 620069f..0bf2d6d 100644 --- a/.subversion/config +++ b/.subversion/config @@ -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 index fdc11ba..0000000 --- a/.subversion/diff +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec diff -Nurp "$@" -- 2.39.5