home · contact · privacy
Improve new setup.
[config] / all_new_2018 / install_for_target.sh
diff --git a/all_new_2018/install_for_target.sh b/all_new_2018/install_for_target.sh
new file mode 100755 (executable)
index 0000000..9d2e1a6
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Walks through the package names in the argument-selected files of
+# apt-mark/ and ensures the respective packages are installed.
+set -e
+
+config_tree_prefix="${HOME}/config/all_new_2018/apt-mark/"
+
+for target in "$@"; do
+    path="${config_tree_prefix}${target}"
+    for line in $(cat "${path}"); do
+        if [ ! $(echo "${line}" | cut -c1) = "#" ]; then
+            apt-get -y install "${line}"
+        fi
+    done
+done