From: Christian Heller Date: Wed, 14 Nov 2018 18:01:55 +0000 (+0100) Subject: Fix scripts. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/template?a=commitdiff_plain;h=8bbfcc3c6a262a74d66ac84a25c7775029f4e53f;p=config Fix scripts. --- diff --git a/all_new_2018/install_for_target.sh b/all_new_2018/install_for_target.sh index 9d2e1a6..d12c36e 100755 --- a/all_new_2018/install_for_target.sh +++ b/all_new_2018/install_for_target.sh @@ -7,7 +7,8 @@ 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 + #for line in $(cat "${path}"); do + cat "${path}" | while read line; do if [ ! $(echo "${line}" | cut -c1) = "#" ]; then apt-get -y install "${line}" fi diff --git a/all_new_2018/purge_nonrequireds.sh b/all_new_2018/purge_nonrequireds.sh index 34692da..993a718 100755 --- a/all_new_2018/purge_nonrequireds.sh +++ b/all_new_2018/purge_nonrequireds.sh @@ -9,7 +9,8 @@ config_tree_prefix="${HOME}/config/all_new_2018/apt-mark/" dpkg-query -Wf '${Package} ${Priority}\n' | grep ' required' | sed 's/ required//' > /tmp/list_white_unsorted for target in "$@"; do path="${config_tree_prefix}${target}" - for line in $(cat "${path}"); do + #for line in $(cat "${path}"); do + cat "${path}" | while read line; do if [ ! $(echo "${line}" | cut -c1) = "#" ]; then echo "${line}" >> /tmp/list_white_unsorted fi