Update build.sh
This commit is contained in:
parent
459145d745
commit
3201a41f1a
30
build.sh
30
build.sh
|
@ -3,30 +3,34 @@
|
|||
# TODO: Get the .pkg.tar.zst from calpkgs
|
||||
|
||||
getAnyPackages() {
|
||||
cd x86_64
|
||||
for arch in "x86_64" "i686" "aarch64"; do
|
||||
cd $arch
|
||||
|
||||
while read -r pkg; do
|
||||
ln -sf "$pkg" "$(basename $pkg)"
|
||||
done < "$1"
|
||||
while read -r pkg; do
|
||||
ln -sf "$pkg" "$(basename $pkg)"
|
||||
done < "$1"
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
buildDatabase() {
|
||||
lastFolder=$(pwd -P)
|
||||
cd db || { echo "Couldn't cd into 'db'." 1>&2 && exit 1; }
|
||||
#cd db || { echo "Couldn't cd into 'db'." 1>&2 && exit 1; }
|
||||
for arch in "x86_64" "i686" "aarch64"; do
|
||||
cd $arch
|
||||
|
||||
while read -r pkg; do
|
||||
repo-add -s -n -R -k "199980CE93F18E62" calrepo.db.tar.gz "$pkg"
|
||||
rm -rf *.old*
|
||||
done < "$1"
|
||||
|
||||
cd "$lastFolder" || { echo "Couldn't cd into '$lastFolder'." 1>&2 && exit 1; }
|
||||
while read -r pkg; do
|
||||
repo-add -s -n -R -k "199980CE93F18E62" calrepo.db.tar.gz "$pkg"
|
||||
rm -rf *.old*
|
||||
done < <(find -H "$PWD" -mindepth 1 -type f -regex '.*.pkg.tar.zst')
|
||||
done
|
||||
#cd "$lastFolder" || { echo "Couldn't cd into '$lastFolder'." 1>&2 && exit 1; }
|
||||
}
|
||||
|
||||
runScript() {
|
||||
getAnyPackages <(find -H "$PWD/any" -mindepth 1 -type f -regex '.*.pkg.tar.zst.*')
|
||||
buildDatabase <(find -H "$PWD" -mindepth 1 -type f -regex '.*.pkg.tar.zst')
|
||||
buildDatabase
|
||||
}
|
||||
|
||||
runScript
|
||||
|
|
Loading…
Reference in New Issue