cpwd=$(pwd)
-quilters=$(grep -v '^#' $CTRL_FILE | awk -F '\t' '$2=="quilt" { print $3; }')
+quilters=$(awk -F '\t' '/^[^#]/ && $2=="quilt" { print $3; }' "$CTRL_FILE")
for name in $quilters; do
sfile="../quilt/$name/series"
base=$(sed -n 's/^#[ \t]*NEXT[-_]BASE[ \t]*\([^ \t]*\)[ \t]*$/\1/p' "$sfile")
if [ -n "$base" ]; then
- nbase=$(grep -v '^#' $CTRL_FILE | awk -F '\t' '$3=="'"$base"'" { printf("%s/%s", "'"$base"'", $5); }')
+ nbase=$(awk -F '\t' '/^[^#]/ && $3=="'"$base"'" { printf("%s/%s", "'"$base"'", $5); }' "$CTRL_FILE")
[ -n "$nbase" ] && base="$nbase"
else
base=$(sed -n 's/^#[ \t]*BASE[ \t]*\(.*\)[ \t]*$/\1/p' "$sfile")
for f in $patches; do
old_head=$(git rev-parse --verify HEAD)
- execute git am --patch-format=mbox "../quilt/$name/$f"
+ execute git am -s --patch-format=mbox "../quilt/$name/$f"
new_head=$(git rev-parse --verify HEAD)
[ "$new_head" = "$old_head" ] && {
echo "Tree unchanged, please check ..."