Add support for update V8 sources to a particular commit.
Change-Id: I2c81c4f79e9e1d980c6db2299dbca02b6a97f751
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
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() {
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
fi
git read-tree --prefix=$srcdir $rev
+if [ $? != 0 ]; then
+ die "Invalid hash!"
+fi
git checkout $srcdir
cat >commitlog.txt <<EOT