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