From 5af9d45d43f6003753a8c8f29d9a80f65fa61ab1 Mon Sep 17 00:00:00 2001 From: Filip Rojek Date: Sat, 29 Apr 2023 11:10:21 +0200 Subject: [PATCH] feat: multiple archs - TEST --- scripts/genPkgRel.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/genPkgRel.sh b/scripts/genPkgRel.sh index 4d9314c..9feafbe 100755 --- a/scripts/genPkgRel.sh +++ b/scripts/genPkgRel.sh @@ -1,10 +1,16 @@ #!/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}')" # generate Packages file -dpkg-scanpackages --multiversion --arch amd64 "./apt-repo/pool/" > "./apt-repo/dists/stable/main/binary-amd64/Packages" -# compress Packages file -cat "./apt-repo/dists/stable/main/binary-amd64/Packages" | gzip -9 > "./apt-repo/dists/stable/main/binary-amd64/Packages.gz" +for ARCH in $ARCHS; do + echo $ARCH + dpkg-scanpackages --multiversion --arch $ARCH "./apt-repo/pool/" > "./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" +done + # generate Release file cd "./apt-repo/dists/stable/" $DIR/generate-release.sh > "Release"