Skip to content

Commit

Permalink
Do not emit xmlUrl when no feed is provided
Browse files Browse the repository at this point in the history
Signed-off-by: Shengqi Chen <[email protected]>
  • Loading branch information
Harry-Chen committed May 17, 2024
1 parent 2bb8fff commit 64718a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .build/buildOpml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<outline title=\"$name\" xmlUrl=\"$xml\" htmlUrl=\"$html\"/>"
if [ ! -z "$xml" ]; then
echo "<outline title=\"$name\" xmlUrl=\"$xml\" htmlUrl=\"$html\"/>"
else
echo "<outline title=\"$name\" htmlUrl=\"$html\"/>"
fi
done

echo "
Expand Down

0 comments on commit 64718a9

Please sign in to comment.