From b79a727d20c673153bb4826adb70be5879ab1d1a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 17 Dec 2009 14:52:56 +0000 Subject: lbu: fix issue with lbu status and links ref #91 --- lbu.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lbu.in') diff --git a/lbu.in b/lbu.in index d4d9c5d..7709567 100644 --- a/lbu.in +++ b/lbu.in @@ -555,7 +555,7 @@ cmd_status() { [ -z "$LBU_MEDIA" ] && usage_status local tmp init_tmpdir tmp - mkdir -p "$tmpdir/a" "$tmp/b" + mkdir -p "$tmp/a" "$tmp/b" # unpack last commited apkovl to tmpdir/a unpack_apkovl "$tmp/a" @@ -567,8 +567,11 @@ cmd_status() { local f ( cd "$tmp"/a && find ) | while read f; do f=${f#./} - [ "$f" = "." ] && continue - [ -e "$tmp/b/$f" ] || echo "D $f" + local b="$tmp/b/$f" + if [ "$f" = "." ] || [ -e "$b" ] || [ -L "$b" ]; then + continue + fi + echo "D $f" done # compare files in b with files in a @@ -577,7 +580,7 @@ cmd_status() { [ "$f" = "." ] && continue local a="$tmp/a/$f" local b="$tmp/b/$f" - if [ ! -e "$a" ]; then + if [ ! -e "$a" ] && [ ! -L "$a" ]; then echo "A $f" elif [ -f "$a" ] && [ -f "$b" ] && [ "$b" -nt "$a" ] \ && ! cmp -s "$a" "$b"; then -- cgit v1.2.3