home · contact · privacy
176f3ea54a7cff883346cb564c1b2812eaf1b9d5
[config] / buster / setup_scripts / 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/buster"
9 aptmark_dir="${config_tree_prefix}/apt-mark"
10
11 for target in "$@"; do
12     path="${aptmark_dir}/${target}"
13     cat "${path}" | while read line; do
14         echo "$line"
15         if [ ! $(echo "${line}" | cut -c1) = "#" ]; then
16             DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::=--force-confold install "${line}"
17         fi
18     done
19 done