big feat & update commit, read description...

feat: regenerate packages & release (update option), letter based folder structure support, choose gpg key, config file, multiple architecture done
update: docs, comments in code, add, del, list, sign
i dont know honestly... docs will be updated later
This commit is contained in:
2023-05-03 17:07:33 +02:00
parent 5af9d45d43
commit ce0b37cabe
7 changed files with 160 additions and 28 deletions

View File

@@ -1,17 +1,18 @@
#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
LS="$(which ls)"
ARCHS="$($LS -l apt-repo/dists/stable/main/ | awk '{print $9}' | awk NF | awk -F - '{print $2}')"
LS="$(which ls)" # this prevents bugs when aliasing ls to tools like exa
REPODIR="$1"
ARCHS="$($LS -l $REPODIR/apt-repo/dists/stable/main/ | awk '{print $9}' | awk NF | awk -F - '{print $2}')"
# generate Packages file
for ARCH in $ARCHS; do
echo $ARCH
dpkg-scanpackages --multiversion --arch $ARCH "./apt-repo/pool/" > "./apt-repo/dists/stable/main/binary-$ARCH/Packages"
dpkg-scanpackages --multiversion --arch $ARCH "$REPODIR/apt-repo/pool/" > "$REPODIR/apt-repo/dists/stable/main/binary-$ARCH/Packages"
# compress Packages file
cat "./apt-repo/dists/stable/main/binary-$ARCH/Packages" | gzip -9 > "./apt-repo/dists/stable/main/binary-$ARCH/Packages.gz"
cat "$REPODIR/apt-repo/dists/stable/main/binary-$ARCH/Packages" | gzip -9 > "$REPODIR/apt-repo/dists/stable/main/binary-$ARCH/Packages.gz"
done
# generate Release file
cd "./apt-repo/dists/stable/"
cd "$REPODIR/apt-repo/dists/stable/"
$DIR/generate-release.sh > "Release"