Debian Codegraph @

util/harfbuzz/update-harfbuzz

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -e
4
5 require_clean_work_treescip-shell shell shell-project 0.0.0 require_clean_work_tree().() {
6 # test if working tree is dirty
7 gitscip-shell system . . git. rev-parse --verify HEAD > /dev/nullscip-shell filesystem . . `/dev/null`. &&
8 gitscip-shell system . . git. update-index --refresh &&
9 gitscip-shell system . . git. diff-files --quiet &&
10 gitscip-shell system . . git. diff-index --cached --quiet HEAD ||
11 die "Working tree is dirty"
12 }
13
14 branch=master
15
16 if [scip-shell system . . `[`. $# = 1 ]; then
17 repo=$1
18 elif [scip-shell system . . `[`. $# = 2 ]; then
19 repo=$1
20 branch=$2
21 else
22 echoscip-shell system . . echo. "usage: $0 <path to local harfbuzz repository> [branch]"
23 exit 1
24 fi
25
26 if [scip-shell system . . `[`. ! -r $repo/.git ]; then
27 echoscip-shell system . . echo. "The provided path $repo does not point to a git repository."
28 exit 2
29 fi
30
31 testscip-shell system . . test. -z "$(gitscip-shell system . . git. rev-parse --show-cdup)" || {
32 exit=$?
33 echoscip-shell system . . echo. >&2 "You need to run this command from the toplevel of the working tree."
34 exit $exit
35 }
36
37 require_clean_work_treescip-shell shell shell-project 0.0.0 require_clean_work_tree().
38
39 url=`gitscip-shell system . . git. --git-dir=$repo/.git config remote.origin.url`
40
41 gitscip-shell system . . git. ls-files src/3rdparty/harfbuzz | gitscip-shell system . . git. update-index --force-remove --stdin
42
43 gitscip-shell system . . git. fetch $repo $branch
44
45 commit=`gitscip-shell system . . git. rev-parse FETCH_HEAD`
46 tree=`gitscip-shell system . . git. cat-file commit FETCH_HEAD|grepscip-shell system . . grep. "^tree" | awkscip-shell system . . awk. '{print $2}'`
47
48 gitscip-shell system . . git. read-tree --prefix=src/3rdparty/harfbuzz $tree
49
50 gitscip-shell system . . git. checkout src/3rdparty/harfbuzz
51
52 gitscip-shell system . . git. status
53
54 catscip-shell system . . cat. >commitlog.txt <<EOT
55 Updated Harfbuzz from $url to $commit
56 EOT
57
58 echoscip-shell system . . echo.
59 echoscip-shell system . . echo. "Wrote commitlog.txt. Use with"
60 echoscip-shell system . . echo.
61 echoscip-shell system . . echo. " git commit -e -F commitlog.txt"
62 echoscip-shell system . . echo.
63 echoscip-shell system . . echo. "to commit your changes"