From c36e9eace777229473fec7046620a8b69ba4b60c Mon Sep 17 00:00:00 2001 From: Manuel Date: Mon, 1 Aug 2022 11:21:23 +0200 Subject: [PATCH] Initial commit --- .gitignore | 3 +++ README.md | 5 +++++ scripts/prepare-chroot.sh | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100755 scripts/prepare-chroot.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a29ba8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/staged +/chroot +.SRCINFO diff --git a/README.md b/README.md new file mode 100644 index 0000000..949d1ca --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# AUR packages + +These are PKGBUILDs for packages on the Arch User Repository I maintain, used to maintain or do plan on uploading or just keep here for preservation. + +I may also use these for an automated build system soon™ that pushes these packages automatically to the AUR and/or to a pacman repo I maintain. diff --git a/scripts/prepare-chroot.sh b/scripts/prepare-chroot.sh new file mode 100755 index 0000000..e38dc6b --- /dev/null +++ b/scripts/prepare-chroot.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +[ -z "$CHROOT" ] && echo "CHROOT env var is unset." && exit 1 + +sudo -v || exit 1 + +arch-nspawn "$CHROOT/root" pacman -Syu +mkdir -p -m 0755 "$CHROOT/$USER" + +mountpoint -q "$CHROOT/$USER" +[ $? -gt 0 ] && sudo mount -t tmpfs -o defaults,nodev,mode=0755,uid=$(id -u),gid=$(id -g) tmpfs "$CHROOT/$USER" + +exit 0