7 sfile="$quilt_dir/$name/series"
8 base=$(sed -n 's/^[# ]*NEXT_BASE[ ]*\(.*\)[ ]*$/\1/p' "$sfile")
9 if [ -n "$base" ]; then
10 base=$(grep -v '^#' ../real_control | awk -F ' ' '$3=="'"$base"'" { if ($2=="quilt") printf("quilt/%s", "'"$base"'"); else printf("%s/%s", "'"$base"'", $5); }')
12 base=$(sed -n 's/^[# ]*BASE[ ]*\(.*\)[ ]*$/\1/p' "$sfile")
16 *-git[0-9]*) rbase=$(wget -q -O - "http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-${base}.id")
18 commit*) rbase=$(expr "$base" : "commit[ ]*\(.*\)")
20 [0-9]*.*) rbase="v$base"
23 #log "Importing $name based on $base"
24 git rev-list -n 1 "$rbase" -- >/dev/null 2>&1 || {
28 grep -q NEXT_PATCHES "$sfile" && {
29 mv -f "$sfile" "$sfile.orig"
33 *NEXT_PATCHES_START*) do_echo=echo
35 *NEXT_PATCHES_END*) do_echo=:
39 done <"$sfile.orig" >"$sfile"
42 #execute git branch -D "next-quilt-$name"
43 git branch -D "next-quilt-$name"
44 #execute git checkout -b "next-quilt-$name" "$rbase" || sh -i || {
45 git checkout -b "next-quilt-$name" "$rbase" || sh -i || {
46 [ -f "$sfile.orig" ] && mv -f $sfile.orig $sfile
49 author=$(grep -v '^#' ../real_control | awk -F ' ' '$3=="'"$name"'" { printf("%s", $1); }' | sed 's/,.*$//')
50 #execute git quiltimport --author "$author" --patches "$quilt_dir/$name" || sh -i || {
51 git quiltimport --author "$author" --patches "$quilt_dir/$name" || sh -i || {
52 [ -f "$sfile.orig" ] && mv -f $sfile.orig $sfile
56 [ -f "$sfile.orig" ] &&
57 mv -f $sfile.orig $sfile