Move scripts

This commit is contained in:
Manuel 2022-10-18 00:03:21 +02:00
parent bae457770e
commit a74e1ee87c
Signed by: Manuel
GPG key ID: 4085037435E1F07A

13
prepare-chroot.sh Executable file
View file

@ -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