X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=import-akpm;h=235ab70386eb5eeb90b2e71226e10f708f5b0c63;hb=HEAD;hp=d206e7a60e7d6634e3d35669254d3c4a2e0e7838;hpb=e182717c8e468a4bbf811bd7a5c253151ad85cae;p=next-scripts diff --git a/import-akpm b/import-akpm deleted file mode 100755 index d206e7a..0000000 --- a/import-akpm +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -log_file=../akpm-import.log - -log() -{ - echo "$@" | tee -a $log_file -} - -execute() -{ - log "$" $@ - "$@" 2>&1 | tee -a $log_file - [ ${PIPESTATUS[0]} -eq 0 ] || $SHELL -i || exit 1 -} - -mmotm="../../mmotm/text" -sfile="$mmotm/series" -cpwd=$(pwd) - -base=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/origin.patch") -nbase=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/linux-next.patch") -git rev-parse --verify "$base" >/dev/null || { - log "Unknown origin BASE $base" - exit 1 -} -git rev-parse --verify "$nbase" >/dev/null || { - log "Unknown linux-next BASE $nbase" - exit 1 -} -db=$(git describe "$base") -dnb=$(git describe --contains "$nbase") -log "Importing akpm based on $db/$dnb" - -[ -d "../quilt-tmp" ] || - execute git clone -s -l -n -q . ../quilt-tmp - -log '$' cd ../quilt-tmp -cd ../quilt-tmp -execute git checkout -b akpm/master "$db" -git branch akpm/current-base - -sed_exp=' -/NEXT_PATCHES_START/,/NEXT_PATCHES_END/{ - s/[ \t]*#.*NEXT_PATCHES_START[ \t]*\([^ \t]*\).*$/>\1/ - s/[ \t]*#.*NEXT_PATCHES_END.*$/*) - cbranch="${f#>}" - [ "$cbranch" ] && - cref="$(git rev-parse --verify HEAD)" - ;; - \<) - [ "$cbranch" ] && { - [ "$cref" != "$(git rev-parse --verify HEAD)" ] && - git branch -f "akpm/$cbranch" - cbranch="" - } - ;; - *) - execute git am --patch-format=mbox "$mmotm/broken-out/$f" - ;; - esac -done - -[ "$cbranch" ] && - [ "$cref" != "$(git rev-parse --verify HEAD)" ] && - git branch -f "akpm/$cbranch" - -log '$' cd $cpwd -cd $cpwd - -execute git fetch akpm - -rm -rf ../quilt-tmp - -exit 0