summaryrefslogtreecommitdiff
path: root/lbu.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-12-17 14:52:56 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-12-17 14:52:56 +0000
commitb79a727d20c673153bb4826adb70be5879ab1d1a (patch)
treead774dc163cb58a26214e813fbaefb3016958c75 /lbu.in
parent63f898c17a41acd7d22657209fed005ae3c55fcd (diff)
downloadalpine-conf-b79a727d20c673153bb4826adb70be5879ab1d1a.zip
lbu: fix issue with lbu status and links
ref #91
Diffstat (limited to 'lbu.in')
-rw-r--r--lbu.in11
1 files changed, 7 insertions, 4 deletions
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