Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Now retains unzipped contents
Browse files Browse the repository at this point in the history
  • Loading branch information
couling committed Jan 28, 2019
1 parent a0ed007 commit 1cd3c32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package-archive-rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function generate_packages() {
else
echo Warning: "$arch_all" does not exist
fi
gzip -9 < "${arch}/Packages" > "${arch}/Packages.gz"
gzip -9fk "${arch}/Packages"
}

function generate_contents() {
Expand All @@ -42,7 +42,6 @@ function generate_contents() {
echo "${file} ${section}/${package_name}"
done
done | sort | uniq | tee -a "${archive}/Contents-${arch##*/binary-}" >> "${arch%/*}/Contents-${arch##*/binary-}"
gzip -9f "${arch%/*}/Contents-${arch##*/binary-}"
}

cd $1 || exit 1
Expand All @@ -54,6 +53,8 @@ do
archive="dists/$archive"
echo "Archive: `pwd`/$archive"

find $archive -name 'Contents-*' -exec rm '{}' '+'

for arch in "$archive"/*/*/
do
arch="${arch%/}"
Expand All @@ -64,8 +65,7 @@ do
fi
done

rm "${archive}/Contents-"*.gz
gzip -9f "${archive}/Contents-"*
find $archive -name 'Contents-*' -exec gzip -9k '{}' '+'

cat "$archive/ReleaseHeader" > "$archive/Release" || exit 1
echo "Date: `date -u '+%a, %d %b %Y %T %Z'`" >> "$archive/Release"
Expand Down

0 comments on commit 1cd3c32

Please sign in to comment.