14 lines
316 B
Bash
14 lines
316 B
Bash
|
#!/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
|