diff options
author | Bob Badour <bbadour@google.com> | 2020-05-18 16:52:16 -0700 |
---|---|---|
committer | Bob Badour <bbadour@google.com> | 2020-05-18 17:29:34 -0700 |
commit | 2e0d635a8717e638eab0cd04e2596a90299c5c5c (patch) | |
tree | da581028905318f358769fc7bb6f8aa7373e2fb7 /.githooks/generic | |
parent | 43e4f53668c5840da1f51260a899cdb19394284b (diff) | |
parent | 7d0daf1b3b3163c34e0108cdb439e2cd2f148152 (diff) | |
download | shflags-2e0d635a8717e638eab0cd04e2596a90299c5c5c.tar.gz |
Merge remote-tracking branch 'aosp/upstream-master' into mymerge
The version of shflags we have now includes a file with an erroneous
LGPL license header even after the author relicensed under Apache2.
Bug: 68860345
Bug: 69058154
Bug: 151953481
Test: manual build
Test: treehugger
Change-Id: Ifc31394445d94248473d60b011fa76f66985e0b4
Diffstat (limited to '.githooks/generic')
-rwxr-xr-x | .githooks/generic | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.githooks/generic b/.githooks/generic new file mode 100755 index 0000000..6f903dc --- /dev/null +++ b/.githooks/generic @@ -0,0 +1,33 @@ +#!/bin/sh +# +# A generic git hook proxy. +# https://git-scm.com/docs/githooks + +run() { + hook=$1 + file=$2 + + n=$(echo "${file}" |sed "s/^.*${hook}\.//") + echo "running ${n} ${hook}" + ${file} +} + +die() { + hook=$1 + echo "${hook} hook did not succeed" >&2 + exit 1 +} + +# Redirect output to stderr. +exec 1>&2 + +githooks='.githooks' +basename=$(basename "$0") + +for f in $(cd ${githooks} && echo *); do + case "${f}" in + ${basename}.*) + run ${basename} "${githooks}/${f}" || die "${f}" + ;; + esac +done |