summaryrefslogtreecommitdiff
path: root/root.sh
diff options
context:
space:
mode:
Diffstat (limited to 'root.sh')
-rwxr-xr-xroot.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/root.sh b/root.sh
new file mode 100755
index 0000000..0fe7be6
--- /dev/null
+++ b/root.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+set -e
+source ./env.sh
+
+pacman-key --init
+pacman -Syu --noconfirm --needed base-devel git jq openssh rsync
+readarray -t deps < <(jq -r '.[] .pkgs[] .deps[]' pkgbuilds.json | sort -u)
+pacman -Sy --needed --noconfirm "${deps[@]}"
+
+sed -i -E 's/(^OPTIONS=\([^)]*)\b(debug)\b/\1!\2/' /etc/makepkg.conf
+
+echo "$GPGRIVKEY_TEXT" >"$GPGPRIVKEY"
+echo "$GPGPASSWD_TEXT" >"$GPGPASSWD"
+echo "$SSHPRIVKEY_TEXT" | tr -d "\r" >"$SSHPRIVKEY"
+
+useradd -m builder
+chown -R builder: .