summaryrefslogtreecommitdiff
path: root/lxc/roll
diff options
context:
space:
mode:
Diffstat (limited to 'lxc/roll')
-rwxr-xr-xlxc/roll18
1 files changed, 18 insertions, 0 deletions
diff --git a/lxc/roll b/lxc/roll
new file mode 100755
index 0000000..ecd1878
--- /dev/null
+++ b/lxc/roll
@@ -0,0 +1,18 @@
+#!/bin/bash
+#set -e
+
+NAME=$1
+lxc-create -n $NAME -t download -- --dist archlinux --release current --arch amd64
+lxc-start -n $NAME
+sleep 10
+lxc-attach -n $NAME -- pacman -Syu --noconfirm
+lxc-attach -n $NAME -- pacman -Sy --noconfirm go git sudo fakeroot binutils make gcc patch
+lxc-attach -n $NAME -- useradd tom
+lxc-attach -n $NAME -- mkdir /home/tom
+lxc-attach -n $NAME -- mkdir /home/tom/yay
+lxc-attach -n $NAME -- git clone https://aur.archlinux.org/yay.git /home/tom/yay
+lxc-attach -n $NAME -- chown tom:tom -R /home/tom
+lxc-attach -n $NAME -- bash -c 'echo "tom ALL=(ALL) ALL" >> /etc/sudoers'
+lxc-attach -n $NAME -- bash -c 'echo -e "tom\ntom" | passwd tom'
+lxc-attach -n $NAME -- bash -c 'cd /home/tom/yay && sudo -u tom makepkg -si --noconfirm'
+lxc-attach -n $NAME -- bash -c 'sudo -u tom yay -Syu --noconfirm'