aboutsummaryrefslogtreecommitdiff
path: root/.config/yadm/install-arch
diff options
context:
space:
mode:
Diffstat (limited to '.config/yadm/install-arch')
-rwxr-xr-x.config/yadm/install-arch14
1 files changed, 12 insertions, 2 deletions
diff --git a/.config/yadm/install-arch b/.config/yadm/install-arch
index 35977c2..1246dae 100755
--- a/.config/yadm/install-arch
+++ b/.config/yadm/install-arch
@@ -1,3 +1,13 @@
#!/bin/sh
-[[ `lsb_release -si` -ne "Arch" ]] && exit
-yay --noconfirm --needed -S - < packages-arch
+# ensure we are running on arch linux
+[ ! -e /etc/os-release ] && exit
+. /etc/os-release
+[ "$ID" != 'arch' ] && exit
+
+# resolve files in this script relative to this script's location
+cd "$(dirname "$0")"
+
+# filter comments and pipe package name list to yay
+sed -e 's/#.*//g' -e 's/ //g' -e '/^$/d' packages-arch |\
+ yay --noconfirm --needed -S -
+