summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-05-26 14:01:19 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-05-26 14:01:19 +0200
commitcbf5cc8f2a80c95c67766f7a0884744283e54fd9 (patch)
tree7835d6fc375279075aed81924edb7d1b40f48ab4
parent7821f06cdfa4af00058d908b2fb44866b4326108 (diff)
downloadxtools-cbf5cc8f2a80c95c67766f7a0884744283e54fd9.tar.gz
xtools-cbf5cc8f2a80c95c67766f7a0884744283e54fd9.tar.xz
xtools-cbf5cc8f2a80c95c67766f7a0884744283e54fd9.zip
xdiff: just list the new files using -l.
-rwxr-xr-xxdiff9
1 files changed, 8 insertions, 1 deletions
diff --git a/xdiff b/xdiff
index 406e24f..bb72fb9 100755
--- a/xdiff
+++ b/xdiff
@@ -1,13 +1,20 @@
 #!/bin/sh
-# xdiff [-u] [DIR] - merge XBPS .new-* files
+# xdiff [-u|-l] [DIR] - merge XBPS .new-* files
 
 mergeutil() {
 	vimdiff "$1" "$2" && rm -vi "$1"
 }
 
+listutil() {
+	printf '%s\n' "$1"
+}
+
 if [ "$1" = -u ]; then
 	shift
 	DIFF="diff -u"
+elif [ "$1" = -l ]; then
+	shift
+	DIFF=listutil
 else
 	DIFF=mergeutil
 fi