From: Stephen Rothwell Date: Sun, 24 Nov 2013 23:24:18 +0000 (+1100) Subject: import_akpm: cope if there is no linus patch X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=c0f0eb815ea37594c9bcd0630c88adbd94184722;p=next-scripts import_akpm: cope if there is no linus patch --- diff --git a/import-akpm b/import-akpm index 83bc7e8..7f2c0cf 100755 --- a/import-akpm +++ b/import-akpm @@ -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"