blob: 8eb70c13455d3764eee79fc6b06c99463f16ffc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From 5368f0a59549b7b26154b2326abfd1f260f1750d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 26 Aug 2014 11:57:53 +0200
Subject: [PATCH] lbu: use --no-dereference with diff when possible
---
lbu.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lbu.in b/lbu.in
index 52172c7..67ec631 100644
--- a/lbu.in
+++ b/lbu.in
@@ -672,6 +672,7 @@ usage: $PROGRAM diff [<media>]
}
cmd_diff() {
+ local diff_opts=
LBU_MEDIA=${1:-"$LBU_MEDIA"}
[ -z "$LBU_MEDIA" ] && [ -z "$LBU_BACKUPDIR" ] && usage_diff
local tmp
@@ -680,7 +681,10 @@ cmd_diff() {
unpack_apkovl "$tmp/a"
ENCRYPTION=
cmd_package - | tar -C "$tmp/b" -zx
- cd "$tmp" && diff -ruN a b
+ if diff --help 2>&1 | grep -q -- --no-dereference; then
+ diff_opts="--no-dereference"
+ fi
+ cd "$tmp" && diff -ruN $diff_opts a b
}
# migrate
--
2.1.0
|