diff --git a/build.sh b/build.sh index d1fd14e..727930c 100644 --- a/build.sh +++ b/build.sh @@ -114,31 +114,31 @@ build_and_package() { # # sudo pacman -U $dir/x86_64/ckbcomp-1.227-1-any.pkg.tar.zst --noconfirm # sudo pacman -U $dir/x86_64/repoctl-0.22.2-1-x86_64.pkg.tar.zst --noconfirm - cd $dir/PKGBUILDS/rockers/ + cd "$dir"/PKGBUILDS/rockers/ sudo chmod -R 777 ../rockers sudo -u builder makepkg -cfs --noconfirm # --sign rm -f **debug**.pkg.tar.zst rm -rf src/ pkg/ - mv *.pkg.tar.zst $dir/x86_64/ - cd $dir/ + mv *.pkg.tar.zst "$dir"/x86_64/ + cd "$dir"/ mkdir -p /tmp/litefm && chmod -R 777 /tmp/litefm - cp $dir/PKGBUILDS/litefm/PKGBUILD /tmp/litefm + cp "$dir"/PKGBUILDS/litefm/PKGBUILD /tmp/litefm cd /tmp/litefm - rm -f $dir/x86_64/**litefm**.pkg.tar.zst + rm -f "$dir"/x86_64/**litefm**.pkg.tar.zst sudo -u builder makepkg -cfs --noconfirm # --sign - mv *.pkg.tar.zst $dir/x86_64/ - cd $dir/ + mv *.pkg.tar.zst "$dir"/x86_64/ + cd "$dir"/ mkdir -p /tmp/ckbcomp - cp $dir/PKGBUILDS/ckbcomp/PKGBUILD /tmp/ckbcomp + cp "$dir"/PKGBUILDS/ckbcomp/PKGBUILD /tmp/ckbcomp cd /tmp/ckbcomp sudo chmod -R 777 /tmp/ckbcomp sudo -u builder makepkg -cfs --noconfirm rm -f **debug**.pkg.tar.zst - cp *.pkg.tar.zst $dir/x86_64/ + cp *.pkg.tar.zst "$dir"/x86_64/ sudo pacman -U *.pkg.tar.zst --noconfirm - cd $dir + cd "$dir" cd "$dir"/PKGBUILDS/calamares sudo chmod -R 777 "$dir"/PKGBUILDS/calamares @@ -171,7 +171,7 @@ build_and_package() { # Initialize and push to GitHub initialize_and_push() { - export URL="$(git config --get remote.origin.url | sed -E 's|.+[:/]([^:/]+)/([^/.]+)(\.git)?|\1/\2|')" + # export URL="$(git config --get remote.origin.url | sed -E 's|.+[:/]([^:/]+)/([^/.]+)(\.git)?|\1/\2|')" cd "$dir" git config --global --add safe.directory /workspace # unnecessary repo-remove x86_64/stratos.db.tar.gz @@ -180,7 +180,7 @@ initialize_and_push() { sudo git config --global user.email 'github-actions[bot]@users.noreply.github.com' sudo git add . sudo git commit -am "Update packages" - sudo git push "https://x-access-token:${GITHUB_TOKEN}@github.com/$URL" --force + sudo git push "https://x-access-token:${GITHUB_TOKEN}@github.com/StratOS-Linux/repo" --force } # Main function