From 64718a9083f2f7746c6acf08f9531eb2a65e1cf8 Mon Sep 17 00:00:00 2001 From: Shengqi Chen Date: Fri, 17 May 2024 14:16:37 +0800 Subject: [PATCH] Do not emit xmlUrl when no feed is provided Signed-off-by: Shengqi Chen --- .build/buildOpml.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.build/buildOpml.sh b/.build/buildOpml.sh index e42a982..cff1b45 100755 --- a/.build/buildOpml.sh +++ b/.build/buildOpml.sh @@ -28,7 +28,11 @@ echo "$content" | while read -r line || [[ -n "$line" ]]; do name=$(echo $line | cut -f2 -d\| | sed 's/[ \t]*$//;s/^[ \t]*//') xml=$(echo $line | cut -f3 -d\| | sed 's/[ \t]*$//;s/^[ \t]*//') html=$(echo $line | cut -f4 -d\| | sed 's/[ \t]*$//;s/^[ \t]*//') - echo "" + if [ ! -z "$xml" ]; then + echo "" + else + echo "" + fi done echo "