From 19f67820a0ca91f98d3a4a8f1cde53f0f5ccfdb5 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 23 Feb 2012 17:20:21 +0100 Subject: [PATCH] Extend the update-v8.sh script Add support for update V8 sources to a particular commit. Change-Id: I2c81c4f79e9e1d980c6db2299dbca02b6a97f751 Reviewed-by: Simon Hausmann --- bin/update-v8.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/update-v8.sh b/bin/update-v8.sh index 12276a2..8e5570c 100755 --- a/bin/update-v8.sh +++ b/bin/update-v8.sh @@ -48,8 +48,12 @@ die() { if [ $# -eq 2 ]; then repository=$1 tag=$2 +elif [ $# -eq 3 ]; then + repository=$1 + tag=$2 + rev=$3 else - die "usage: $0 [url] [commit]" + die "usage: $0 [url] [commit] ([hash])" fi require_clean_work_tree() { @@ -76,7 +80,9 @@ if [ $? != 0 ]; then die "git fetch failed" fi -rev=`git rev-parse FETCH_HEAD` +if [ -z $rev ]; then + rev=`git rev-parse FETCH_HEAD` +fi srcdir=src/3rdparty/v8 absSrcDir=$PWD/$srcdir @@ -107,6 +113,9 @@ else fi git read-tree --prefix=$srcdir $rev +if [ $? != 0 ]; then + die "Invalid hash!" +fi git checkout $srcdir cat >commitlog.txt <