summaryrefslogtreecommitdiff
path: root/root.sh
diff options
context:
space:
mode:
authortoufic ar <contact@toufy.me>2026-10-18 16:35:18 +0300
committertoufic ar <contact@toufy.me>2026-10-18 16:35:18 +0300
commiteba208519ba421cb7fa34f4f17ca43036ec4af79 (patch)
treeb92d32d5944dfe86a169f66ce9b47517c5d3cabc /root.sh
parent13c58543735c6dd95b5c407e800c819b2a641605 (diff)
downloadtaur-eba208519ba421cb7fa34f4f17ca43036ec4af79.tar.gz
taur-eba208519ba421cb7fa34f4f17ca43036ec4af79.zip
make .nick optional, allow empty .deps, add env files
Diffstat (limited to 'root.sh')
-rwxr-xr-xroot.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/root.sh b/root.sh
index 652f373..0cae556 100755
--- a/root.sh
+++ b/root.sh
@@ -5,9 +5,14 @@ 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)
+readarray -t deps < <(jq -r '.[] .pkgs[] | select(.deps != null) | .deps[]' pkgbuilds.json | sort -u)
pacman -Sy --needed --noconfirm "${deps[@]}"
+jq -r \
+ '.[] .pkgs[] | select(.env != null) | .env | to_entries[] | "\(.key) \(.value)"' \
+ pkgbuilds.json | \
+ while read -r target link; do ln -sf "$(pwd)"/env/"$target" "$link"; done
+
sed -i -E 's/(^OPTIONS=\([^)]*)\b(debug)\b/\1!\2/' /etc/makepkg.conf
cp "$GPGRIVKEY_TEXT" "$GPGPRIVKEY"