home · contact · privacy
Add basic w530-specific setup scripting.
[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     # TODO: continue if file at $path not found, to get rid of dummy files
14     cat "${path}" | while read line; do
15         echo "$line"
16         if [ ! $(echo "${line}" | cut -c1) = "#" ]; then
17             DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::=--force-confold install "${line}"
18         fi
19     done
20 done