From 8bbfcc3c6a262a74d66ac84a25c7775029f4e53f Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 14 Nov 2018 19:01:55 +0100 Subject: [PATCH] Fix scripts. --- all_new_2018/install_for_target.sh | 3 ++- all_new_2018/purge_nonrequireds.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.30.2