Improve error handling on generate-* scripts
This commit is contained in:
parent
2f6fc56e9a
commit
2e649f71e0
@ -35,8 +35,14 @@ test -f _git_upstream_commit || die "Cannot find _git_upstream_commit file."
|
|||||||
test -f _patch_order || die "Cannot find _patch_order file."
|
test -f _patch_order || die "Cannot find _patch_order file."
|
||||||
|
|
||||||
last_ancestor_commit=`cat _git_upstream_commit`
|
last_ancestor_commit=`cat _git_upstream_commit`
|
||||||
|
|
||||||
cd $1
|
cd $1
|
||||||
|
|
||||||
|
git name-rev $last_ancestor_commit
|
||||||
|
test $? -eq 0 || die "Could not find $last_ancestor_commit in the repository $1. Did you run 'git fetch'?"
|
||||||
|
|
||||||
git checkout $last_ancestor_commit
|
git checkout $last_ancestor_commit
|
||||||
for p in `cat ../_patch_order` ; do
|
for p in `cat ../_patch_order` ; do
|
||||||
git am ../$p
|
git am ../$p
|
||||||
|
test $? -eq 0 || die "Could not apply patch '$p'."
|
||||||
done
|
done
|
||||||
|
@ -51,6 +51,10 @@ for f in `cat _patch_order` ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
cd $1
|
cd $1
|
||||||
|
|
||||||
|
git name-rev $commit_or_tag
|
||||||
|
test $? -eq 0 || die "Could not find $commit_or_tag in the repository. Did you run 'git fetch'?"
|
||||||
|
|
||||||
idx=1
|
idx=1
|
||||||
common_ancestor=`git merge-base HEAD $commit_or_tag`
|
common_ancestor=`git merge-base HEAD $commit_or_tag`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user