File: update-harfbuzz

package info (click to toggle)
qtbase-opensource-src 5.15.2%2Bdfsg-9%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 349,056 kB
  • sloc: cpp: 2,029,566; ansic: 316,149; xml: 117,558; python: 10,681; java: 7,431; asm: 4,023; perl: 2,044; sh: 1,971; yacc: 1,687; lex: 1,333; javascript: 878; makefile: 316; objc: 70
file content (63 lines) | stat: -rwxr-xr-x 1,319 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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"