mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
pre-commit: Update the indent hook to work with our fork
We now have gst-indent-1.0 [1] which is a stripped down fork of the version we expect. It's also using meson, which is a bonus. [1] https://gitlab.freedesktop.org/gstreamer/gst-indent Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6624>
This commit is contained in:
parent
9156b373e6
commit
b850a658ed
2 changed files with 16 additions and 10 deletions
|
@ -7,23 +7,29 @@
|
|||
# On some *bsd systems the binary seems to be called gnunindent,
|
||||
# so check for that first.
|
||||
|
||||
version=$(gnuindent --version 2>/dev/null)
|
||||
|
||||
version=$(gst-indent-1.0 --version 2>/dev/null)
|
||||
if test -z "$version"; then
|
||||
version=$(gindent --version 2>/dev/null)
|
||||
version=$(gnuindent --version 2>/dev/null)
|
||||
if test -z "$version"; then
|
||||
version=$(indent --version 2>/dev/null)
|
||||
version=$(gindent --version 2>/dev/null)
|
||||
if test -z "$version"; then
|
||||
echo "GStreamer git pre-commit hook:"
|
||||
echo "Did not find GNU indent, please install it before continuing."
|
||||
exit 1
|
||||
version=$(indent --version 2>/dev/null)
|
||||
if test -z "$version"; then
|
||||
echo "GStreamer git pre-commit hook:"
|
||||
echo "Did not find GNU indent, please install it before continuing."
|
||||
exit 1
|
||||
else
|
||||
INDENT=indent
|
||||
fi
|
||||
else
|
||||
INDENT=indent
|
||||
INDENT=gindent
|
||||
fi
|
||||
else
|
||||
INDENT=gindent
|
||||
INDENT=gnuindent
|
||||
fi
|
||||
else
|
||||
INDENT=gnuindent
|
||||
INDENT=gst-indent-1.o
|
||||
fi
|
||||
|
||||
case $($INDENT --version) in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
for execname in gnuindent gindent indent; do
|
||||
for execname in gst-indent-1.0 gnuindent gindent indent; do
|
||||
version=`$execname --version 2>/dev/null`
|
||||
if test "x$version" != "x"; then
|
||||
INDENT=$execname
|
||||
|
|
Loading…
Reference in a new issue