summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2012-02-23 17:20:21 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-23 17:43:34 +0100
commit19f67820a0ca91f98d3a4a8f1cde53f0f5ccfdb5 (patch)
tree86d6427e2650544452980f356938ecf1785f1a84 /bin
parent171dd5ba476fca7cd7d3c944c82ca14e2e858217 (diff)
Extend the update-v8.sh script
Add support for update V8 sources to a particular commit. Change-Id: I2c81c4f79e9e1d980c6db2299dbca02b6a97f751 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/update-v8.sh13
1 files 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 <<EOT