]> git.ozlabs.org Git - next-scripts/commitdiff
import_akpm: cope if there is no linus patch
authorStephen Rothwell <sfr@canb.auug.org.au>
Sun, 24 Nov 2013 23:24:18 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sun, 24 Nov 2013 23:24:18 +0000 (10:24 +1100)
import-akpm

index 83bc7e84e11522d4723d01adbe535d025d97b269..7f2c0cf3a7a8cc6c08a18c2fe05b018b90439225 100755 (executable)
@@ -18,7 +18,10 @@ mmotm="../../mmotm/text"
 sfile="$mmotm/series"
 cpwd=$(pwd)
 
-base=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/origin.patch")
+[ -f "$mmotm/broken-out/origin.patch" ] &&
+       base=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/origin.patch")
+[ "$base" ] ||
+       base=$(git describe --abbrev=0 origin/master)
 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"