From a791a07f769fbc27e40b28512069990de5f5bdb8 Mon Sep 17 00:00:00 2001 From: "committer@tuxwarrior" Date: Sat, 19 Apr 2025 15:23:13 -0500 Subject: [PATCH] / remove comments from services.txt --- scripts/99_software.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/scripts/99_software.sh b/scripts/99_software.sh index 3e8138b..92aa3dc 100755 --- a/scripts/99_software.sh +++ b/scripts/99_software.sh @@ -155,22 +155,13 @@ do_services() { exit 1 fi - mapfile -t services < ${trg_file} - - echo "::: ${services[@]}" + # remove comments + sed '/^[[:blank:]]*#/d;s/#.*//' ${trg_file} > ${trg_file}.tmp + mapfile -t services < ${trg_file}.tmp for x in ${services[@]}; do - - echo ">>> ${x}" - - if [[ "${x}" =~ ^#.* ]]; then - echo "skipping comment ${x}" - continue - fi - echo "systemctl enable ${x}" -# systemctl enable ${x} - + systemctl enable ${x} done }