Skip to content

Commit 115f938

Browse files
committed
Fixed dotfile mv in pkg-build-deb picking up . and ..
The glob pattern `.*` matches `.` and `..`, causing spurious warnings during tarball extraction. The `|| true` prevented the script from failing, but the warnings are noisy and confusing. Replaced with a loop that skips these special directory entries. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 053bd25 commit 115f938

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

deps-packaging/pkg-build-deb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ echo "$SRCFILES" | while read srcfile opts; do
6464
mkdir -p "$TD"
6565
$UNCOMPRESS $srcfile | tar -C $TD -xf -
6666
mv $TD/*/* $PKGDIR
67-
# Also move dot files, but don't fail if there are none
68-
mv $TD/*/.* $PKGDIR || true
67+
# Also move dot files (.gitignore, etc.), skipping . and ..
68+
for _dotfile in $TD/*/.*; do
69+
case "${_dotfile##*/}" in
70+
.|..) continue ;;
71+
*) mv "$_dotfile" "$PKGDIR" ;;
72+
esac
73+
done
6974
rm -r "$TD"
7075
fi
7176
done

0 commit comments

Comments
 (0)