diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-26 11:57:53 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-26 11:59:11 +0200 |
commit | 5368f0a59549b7b26154b2326abfd1f260f1750d (patch) | |
tree | ab6744bdcca4d509b488d3d8625fbae7197c4a9c | |
parent | d2635c3461da1b96df132f62eec95a9fc37081a6 (diff) | |
download | alpine-conf-5368f0a59549b7b26154b2326abfd1f260f1750d.zip |
lbu: use --no-dereference with diff when possible
-rw-r--r-- | lbu.in | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |