Add build.sh
This commit is contained in:
parent
091d93fb63
commit
5c350b8d88
25
build.sh
25
build.sh
|
@ -3,17 +3,26 @@
|
||||||
# TODO: Get the .pkg.tar.zst from calpkgs
|
# TODO: Get the .pkg.tar.zst from calpkgs
|
||||||
|
|
||||||
buildDatabase() {
|
buildDatabase() {
|
||||||
repo-add -s -n -R -k "199980CE93F18E62" calrepo.db.tar.gz *.pkg.tar.zst
|
cd db || { echo "Couldn't cd into 'db'." 1>&2 && exit 1; }
|
||||||
rm -rf *.old*
|
|
||||||
}
|
|
||||||
|
|
||||||
runScript() {
|
while read -r pkg; do
|
||||||
lastFolder=$(pwd -P)
|
repo-add -s -n -R -k "199980CE93F18E62" calrepo.db.tar.gz "$pkg"
|
||||||
cd x86_64 || { echo "Couldn't cd into 'x86_64'." 1>&2 && exit 1; }
|
done < "$1"
|
||||||
|
|
||||||
buildDatabase
|
|
||||||
|
|
||||||
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() {
|
||||||
|
# lastFolder=$(pwd -P)
|
||||||
|
|
||||||
|
# local IFS=
|
||||||
|
# while read -r -d '' arch; do
|
||||||
|
# cd "$arch" || { echo "Couldn't cd into 'x86_64'." 1>&2 && exit 1; }
|
||||||
|
# buildDatabase
|
||||||
|
# cd "$lastFolder" || { echo "Couldn't cd into '$lastFolder'." 1>&2 && exit 1; }
|
||||||
|
# done < <(find -H "$PWD" -mindepth 1 -type f -regex '.*.pkg.tar.zst' -print0)
|
||||||
|
|
||||||
|
buildDatabase <(find -H "$PWD" -mindepth 1 -type f -regex '.*.pkg.tar.zst')
|
||||||
|
}
|
||||||
|
|
||||||
runScript
|
runScript
|
||||||
|
|
Loading…
Reference in New Issue