#!/bin/bash
+. "$(dirname $0)/common.sh"
+
log_file=../quilt-import.log
#cp /dev/null $log_file
cpwd=$(pwd)
-quilters=$(grep -v '^#' ../real_control | 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 '^#' ../real_control | 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")
fi
rbase="$base"
case "$base" in
- *-git[0-9]*) rbase=$($(dirname $0)/get_gitid "${base}")
+ *-git[0-9]*) rbase=$("$bin_dir/get_gitid" "${base}")
;;
commit*) rbase=${base##commit*[[:space:]]}
;;
for f in $patches; do
old_head=$(git rev-parse --verify HEAD)
- execute git am "../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 ..."