]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
d: pass extra args to diff(1)
authorElan Ruusamäe <glen@delfi.ee>
Fri, 20 Mar 2015 11:56:07 +0000 (13:56 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 20 Mar 2015 11:56:07 +0000 (13:56 +0200)
shrc.sh

diff --git a/shrc.sh b/shrc.sh
index 8e3698402618e0238fa7eba0fca2d14320fc6c37..aceec77bc11ef1563b4888d6a1b28ed881ccb045 100755 (executable)
--- a/shrc.sh
+++ b/shrc.sh
@@ -294,8 +294,8 @@ sed -e '
 # does diff between FILE~ and FILE
 # the diff can be applied with patch -p1
 d() {
-       local file="$1"
-       local dir diff
+       local file="$1" dir
+       shift
        if [[ "$file" = /* ]]; then
                # full path -- no idea where to strip
                dir=.
@@ -306,7 +306,7 @@ d() {
                diff=${PWD##*/}/${file}
        fi
 
-       (builtin cd "$dir"; dif $diff{~,})
+       (builtin cd "$dir"; dif $diff{~,} "$@")
 }
 
 # spec name from NVR
This page took 0.054185 seconds and 4 git commands to generate.