Initial commit
This commit is contained in:
commit
c36e9eace7
3 changed files with 21 additions and 0 deletions
13
scripts/prepare-chroot.sh
Executable file
13
scripts/prepare-chroot.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue