From 4255c9054b676cc82f8a2b0af47d348c3a9bd83e Mon Sep 17 00:00:00 2001 From: Fireatoms Date: Wed, 16 Mar 2022 20:16:10 +0800 Subject: [PATCH] fix: failed to skip comment lines in xxx.deps --- deps/3rd/dep_create.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/3rd/dep_create.sh b/deps/3rd/dep_create.sh index 04ecb2809..bcbdd9d39 100644 --- a/deps/3rd/dep_create.sh +++ b/deps/3rd/dep_create.sh @@ -115,7 +115,7 @@ function save_content { if [[ $(echo "$section" | grep -E "^target\-") != "" ]] then target_name=$(echo $section | sed 's|^target\-\(.*\)$|\1|g') - targets["$target_name"]="$(echo "${content["$section"]}" | grep -Eo "repo=.*" | awk -F '=' '{ print $2 }')" + targets["$target_name"]="$(echo "${content}" | grep -Eo "repo=.*" | awk -F '=' '{ print $2 }')" echo "target: $target_name, repo: ${targets["$target_name"]}" else packages["$section"]=$content @@ -133,7 +133,7 @@ do # section=${line//\[\(.*\)\]/\1} section=$(echo $line | sed 's|.*\[\(.*\)\].*|\1|g') else - [[ "$line" != "" ]] && [[ "$line" != '\#*' ]] && content+=$'\n'"$line" + [[ "$line" != "" ]] && [[ "$line" != '#'* ]] && content+=$'\n'"$line" fi done < $DEP_FILE save_content