diff --git a/build.sh b/build.sh index 49e9984..b51fd05 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash getAnyPackages() { - mapfile -t pkgs <(find -H "$PWD/any" -mindepth 1 -type f -regex '.*.pkg.tar.zst.*') + mapfile -t pkgs < <(find -H "$PWD/any" -mindepth 1 -type f -regex '.*.pkg.tar.zst.*') for arch in "x86_64" "i686" "aarch64"; do cd "$arch" || { echo "Couldn't cd into '$arch'." 1>&2 && exit 1; } for pkg in "${pkgs[@]}"; do @@ -20,10 +20,10 @@ buildDatabase() { cd "$arch" || { echo "Couldn't cd into '$arch'." 1>&2 && exit 1; } while read -r pkg; do if [ "$dryRunFlag" = false ]; then - echo "repo-add -s -n -R -k calrepo.db.tar.gz $pkg" - else repo-add -s -n -R -k "199980CE93F18E62" calrepo.db.tar.gz "$pkg" rm -rf -- *.old* + else + echo "repo-add -s -n -R -k calrepo.db.tar.gz $pkg" fi done < <(find -L "$PWD" -mindepth 1 -type f -regex '.*.pkg.tar.zst') cd .. || { echo "Couldn't cd into the parent folder." 1>&2 && exit 1; }