]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
properly escape added-to-stable
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 29 Jul 2008 17:19:00 +0000 (10:19 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 29 Jul 2008 17:19:00 +0000 (10:19 -0700)
scripts/added-to-stable

index 02b5f7eb127ba907c1dbc0ad6cba81cc8514e09d..75ed2f7f9f7c1684322e2f7f0e36027a511befba 100755 (executable)
@@ -9,7 +9,7 @@
 #      exit 1
 #}
 
-KERNEL_MINOR_VERSION='23'
+KERNEL_MINOR_VERSION='25'
 KERNEL="2.6.$KERNEL_MINOR_VERSION"
 
 EMAIL_ADDRESS='<gregkh@suse.de>'
@@ -48,14 +48,14 @@ author()
         TXT=$2
         if [ ! -f $TXT ]
         then
-                echo $TXT is missing
+                echo "$TXT is missing"
                 exit 1
         fi
         author=""
         while read l
         do
                # skip the Message-ID: line so we don't send email to the wrong place
-               echo $l
+               echo "$l"
                reply=$(echo "$l" | grep -i Message-ID:)
                if [ x"$reply" != x ]
                then
@@ -85,10 +85,10 @@ author()
                         fi
                 done
         done < $TXT
-        author=$(echo $author | tr ' ' '\n' | grep -v "$first_author" |
+        author=$(echo "$author" | tr ' ' '\n' | grep -v "$first_author" |
                 sort | uniq)
         author="$first_author $author"
-        eval $1=$(echo $author | sed -e 's/ /,/g')
+        eval $1=$(echo "$author" | sed -e 's/ /,/g')
         if [ x"$3" != x ]
         then
                 eval $3=$first_author
@@ -113,15 +113,15 @@ reply()
 #      TITLE=$(head -n 2 $PATCH | tail -n 1)
        MESSAGE_ID=`grep -i "^Message-ID:" $PATCH | cut -f 2 -d ' ' | cut -f 2 -d '<' | cut -f 1 -d '>'`
        author AUTHOR $1 FIRST_AUTHOR
-       echo author said $AUTHOR
-       echo first_author said $FIRST_AUTHOR
+       echo "author said $AUTHOR"
+       echo "first_author said $FIRST_AUTHOR"
        if [ x"$AUTHOR" == "x" ]
        then
-               echo nobody to notify
+               echo "nobody to notify"
                exit 0
        fi
        to=""
-       for i in $(echo $AUTHOR | sed -e 's/,/ /g')
+       for i in $(echo "$AUTHOR" | sed -e 's/,/ /g')
        do
                if ! echo "$TO" | grep "$i"
                then
@@ -135,8 +135,8 @@ reply()
 
        SUBJECT="patch $PATCH added to $KERNEL-stable tree"
 
-       echo makemail -to $AUTHOR -from=$FROM -subject="$SUBJECT" -date="$(date -R)" -reply_to=$MESSAGE_ID
-       echo smtpsend -server=$SMTP_SERVER $to -from=$FROM
+       echo "makemail -to $AUTHOR -from=$FROM -subject=\"$SUBJECT\" -date=\"$(date -R)\" -reply_to=$MESSAGE_ID"
+       echo "smtpsend -server=$SMTP_SERVER $to -from=$FROM"
 
 
        (
@@ -144,11 +144,11 @@ reply()
                echo -n "This is a note to let you know that we have just queued up the "
                echo "patch titled"
                echo
-               echo "    " $TITLE
+               echo "    $TITLE"
                echo
-               echo "to the "$KERNEL"-stable tree.  Its filename is"
+               echo "to the $KERNEL-stable tree.  Its filename is"
                echo
-               echo "    " $PATCH
+               echo "    $PATCH"
                echo
                echo "A git repo of this tree can be found at "
                echo "    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary"
@@ -163,7 +163,7 @@ reply()
                grep -lR $FIRST_AUTHOR /home/gregkh/linux/stable/stable-queue/queue-$KERNEL/ 2> /dev/null |
                        sed -e 's/\/home\/gregkh\/linux\/stable\/stable-queue\///'
        ) |
-       makemail -to $AUTHOR -from=$FROM -cc="$STABLE, $STABLE_COMMITS"  \
+       makemail -to "$AUTHOR" -from="$FROM" -cc="$STABLE, $STABLE_COMMITS"  \
                -subject="$SUBJECT" \
                -date="$(date -R)" \
                -reply_to="$MESSAGE_ID" | \