diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | chroot-build.sh | 24 |
2 files changed, 26 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index b39f3b2a183f..1c9a864c9f3d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ !PKGBUILD !.gitignore !.SRCINFO +!chroot-build.sh + diff --git a/chroot-build.sh b/chroot-build.sh new file mode 100755 index 000000000000..f358a74acaaf --- /dev/null +++ b/chroot-build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# This script updates the package version if a new version is available +set -euxo pipefail + +# Preparing arch-chroot +CHROOT=$HOME/.local/share/chroot +if [[ ! -d "$CHROOT" ]]; then + mkdir -p "$CHROOT" + mkarchroot "$HOME/.local/share/chroot/root" base-devel + arch-nspawn "$HOME/.local/share/chroot/root" pacman -Syu +fi + +# Start generate package +makechrootpkg -c -r "$CHROOT" -- -Acsf . + +# Update .SRCINFO +#makepkg --printsrcinfo >.SRCINFO + +# Commit changes +#git add PKGBUILD .SRCINFO +#git commit -s -m "Update to ${VER}" +#rm -rf *.gz *.log *.zst +sudo rm -Rf "$CHROOT" |