Files
upx/src/stub/scripts/upx-clang-format
T
Markus F.X.J. Oberhumer 2575eef3c0 clang-format more files.
"Gofmt's style is nobody's favourite, but gofmt is everybody's favourite."
    - Rob Pike
2021-01-04 20:26:31 +01:00

28 lines
821 B
Bash
Executable File

#! /usr/bin/env bash
## vim:set ts=4 sw=4 et:
set -e; set -o pipefail
# "Gofmt's style is nobody's favourite, but gofmt is everybody's favourite." Rob Pike
# NOTE: we are using clang-format-10.0.1 from upx-stubtools
# see https://github.com/upx/upx-stubtools/releases
CLANG_FORMAT="$HOME/local/bin/bin-upx/clang-format-10.0.1"
if [[ ! -f $CLANG_FORMAT ]]; then
CLANG_FORMAT="$HOME/.local/bin/bin-upx/clang-format-10.0.1"
fi
if [[ ! -f $CLANG_FORMAT ]]; then
CLANG_FORMAT="$HOME/bin/bin-upx/clang-format-10.0.1"
fi
if [[ ! -f $CLANG_FORMAT ]]; then
echo "ERROR: $0: cannot find clang-format-10.0.1"
echo "ERROR: $0: please visit https://github.com/upx/upx-stubtools"
exit 1
fi
# NOTE: we use .clang-format config from upx.git/.clang-format
#echo $CLANG_FORMAT
exec "$CLANG_FORMAT" -style=file "$@"
exit 1