[TOOLS] extract-patch-data: fix unbound variable error

This commit is contained in:
Carmelo Messina
2024-06-15 09:07:03 +02:00
parent 2a61bc93cf
commit 01202898fe
+4 -7
View File
@@ -2,6 +2,9 @@
set -euo pipefail
MESSAGE=""
LICENSE=""
while read -r current_line; do
if [[ $current_line =~ ^Filename:* ]]; then
FILENAME=${current_line:9}
@@ -25,7 +28,7 @@ while read -r current_line; do
break
elif [ -n "$current_line" ]; then
if [ -n "$MESSAGE" ]; then
if [ -n "$MESSAGE" ]; then
MESSAGE+="<br>"
fi
MESSAGE+=$current_line
@@ -33,12 +36,6 @@ while read -r current_line; do
fi
done
# echo FROM: $FROM
# echo SUBJECT: $SUBJECT
# echo DATE: $DATE
# echo LICENSE: $LICENSE
# echo -e MESSAGE: $MESSAGE
echo "|**$SUBJECT**" \
"<br><sub><nobr>$DATE</nobr>" \
"<br>File: [$FILENAME](/build/patches/$FILENAME)" \