Skip to content

Commit

Permalink
add sleep?
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayyn committed Mar 28, 2024
1 parent 31153ce commit 2c3f417
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions apt/private/dpkg_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ shift 2
tmp_out=$(mktemp)

while (( $# > 0 )); do
control="$($bsdtar -xf "$1" --to-stdout ./control)"
echo "$control" | head -n 1 >> $tmp_out
echo "Status: install ok installed" >> $tmp_out
echo "$control" | tail -n +2 >> $tmp_out
echo "" >> $tmp_out
$bsdtar -xf "$1" --to-stdout ./control |
awk '{
print $0;
if (NR == 1) { print "Status: install ok installed"};
} END { print "" }
' >> $tmp_out
shift
done

mtree_out=$(mktemp)
echo "#mtree
./var/lib/dpkg/status type=file uid=0 gid=0 mode=0644 contents=$tmp_out
" > $mtree_out
" | "$bsdtar" $@ -cf "$out" "@-"

"$bsdtar" $@ -cf "$out" "@$mtree_out"

rm $tmp_out $mtree_out
rm $tmp_out

0 comments on commit 2c3f417

Please sign in to comment.