summaryrefslogtreecommitdiffstats
path: root/util/harfbuzz
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 09:34:13 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 09:34:13 (GMT)
commit67ad0519fd165acee4a4d2a94fa502e9e4847bd0 (patch)
tree1dbf50b3dff8d5ca7e9344733968c72704eb15ff /util/harfbuzz
downloadQt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.zip
Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.gz
Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.bz2
Long live Qt!
Diffstat (limited to 'util/harfbuzz')
-rwxr-xr-xutil/harfbuzz/update-harfbuzz63
1 files changed, 63 insertions, 0 deletions
diff --git a/util/harfbuzz/update-harfbuzz b/util/harfbuzz/update-harfbuzz
new file mode 100755
index 0000000..29891b6
--- /dev/null
+++ b/util/harfbuzz/update-harfbuzz
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+set -e
+
+require_clean_work_tree() {
+ # test if working tree is dirty
+ git rev-parse --verify HEAD > /dev/null &&
+ git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --cached --quiet HEAD ||
+ die "Working tree is dirty"
+}
+
+branch=master
+
+if [ $# = 1 ]; then
+ repo=$1
+elif [ $# = 2 ]; then
+ repo=$1
+ branch=$2
+else
+ echo "usage: $0 <path to local harfbuzz repository> [branch]"
+ exit 1
+fi
+
+if [ ! -r $repo/.git ]; then
+ echo "The provided path $repo does not point to a git repository."
+ exit 2
+fi
+
+test -z "$(git rev-parse --show-cdup)" || {
+ exit=$?
+ echo >&2 "You need to run this command from the toplevel of the working tree."
+ exit $exit
+}
+
+require_clean_work_tree
+
+url=`git --git-dir=$repo/.git config remote.origin.url`
+
+git ls-files src/3rdparty/harfbuzz | git update-index --force-remove --stdin
+
+git fetch $repo $branch
+
+commit=`git rev-parse FETCH_HEAD`
+tree=`git cat-file commit FETCH_HEAD|grep "^tree" | awk '{print $2}'`
+
+git read-tree --prefix=src/3rdparty/harfbuzz $tree
+
+git checkout src/3rdparty/harfbuzz
+
+git status
+
+cat >commitlog.txt <<EOT
+Updated Harfbuzz from $url to $commit
+EOT
+
+echo
+echo "Wrote commitlog.txt. Use with"
+echo
+echo " git commit -e -F commitlog.txt"
+echo
+echo "to commit your changes"