mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-26 19:40:24 +00:00
Scripts/git-pre-commit-hook: Support GNU and BSD sed
This commit is contained in:
parent
818824d340
commit
33f04ef71c
@ -8,7 +8,12 @@ else
|
||||
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
||||
fi
|
||||
|
||||
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | sed -r "s/^[A-Z]+[A-Z0-9]*[ \t]+/ /")
|
||||
SED="sed -r " # BSD sed
|
||||
if test $(sed --version | grep -c GNU) -gt 0 ; then
|
||||
SED="sed -E "
|
||||
fi
|
||||
|
||||
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | ${SED} "s/^[A-Z]+[A-Z0-9]*[ \t]+/ /")
|
||||
|
||||
# Redirect output to stderr.
|
||||
exec 1>&2
|
||||
|
Loading…
Reference in New Issue
Block a user