summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schendel2024-03-20 14:44:16 +0100
committerChristian Schendel2024-03-20 14:44:16 +0100
commitb019e094ba595613a86e807769b6f25cdcfa61cd (patch)
tree7150224dba8f6e467fd6b23c70772a3bdfb34e04
parent13e3017f3309bb1718cc397accfa37d3e11fd00f (diff)
downloadaur-b019e094ba595613a86e807769b6f25cdcfa61cd.tar.gz
add chroot-build
modified: .gitignore new file: chroot-build.sh
-rw-r--r--.gitignore2
-rwxr-xr-xchroot-build.sh24
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"