]> git.ozlabs.org Git - next-scripts/blobdiff - message_helper
merge_msg: set and use tools_dir
[next-scripts] / message_helper
index 517fbe901f650479a014a260300b55d738bbfecc..4224734bc19d0d9c39a592596537e2dd7328d8a7 100755 (executable)
@@ -9,7 +9,7 @@ if [ -f merge.log ]; then
 fi
 
 branch=
-if [ "$1" = '-t' ]; then
+if [ "$1" = '-b' ]; then
         branch="$2"
         shift 2
 fi
@@ -30,13 +30,14 @@ fi
 
 contact=$(get_contacts "$branch")
 subject=${1//BRANCH/$branch}
-filter="sed -e 's/BRANCH/$branch/g'"
-if [ "$kconfig" ]; then
-       filter="$filter -e 's/KCONFIG_NAME/$kconfig/g'"
+filter=( -e "s/BRANCH/$branch/g" )
+if [ -n "$kconfig" ]; then
+       filter+=( -e "s/KCONFIG_NAME/$kconfig/g" )
 fi
-filter="$filter | fmt -s"
 
-{ printf 'Hi all,\n\n'; eval "$filter"; } |
-       "$bin_dir"/send_email "linux-next: $subject" "$contact" "${cc[@]}"
+{
+       printf 'Hi all,\n\n'
+       sed "${filter[@]}" | fmt -s
+} | "$bin_dir"/send_email "linux-next: $subject" "$contact" "${cc[@]}"
 
 exit 0