home · contact · privacy
Fix problems with web server setup.
[config] / all_new_2018 / install_for_target.sh
1 #!/bin/sh
2 # Walks through the package names in the argument-selected files of
3 # apt-mark/ and ensures the respective packages are installed.
4 #
5 # Ignores anything in an apt-mark/ file after the last newline.
6 set -e
7
8 config_tree_prefix="${HOME}/config/all_new_2018/apt-mark/"
9
10 for target in "$@"; do
11     path="${config_tree_prefix}${target}"
12     cat "${path}" | while read line; do
13         echo "$line"
14         if [ ! $(echo "${line}" | cut -c1) = "#" ]; then
15             apt-get -y install "${line}"
16         fi
17     done
18 done