misc: move some scripts from src/stub/scripts to misc/scripts

This commit is contained in:
Markus F.X.J. Oberhumer
2022-08-23 02:55:30 +02:00
parent be30c26dbb
commit 45e6e73d85
5 changed files with 5 additions and 5 deletions
+29
View File
@@ -0,0 +1,29 @@
#! /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
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
UPX_CLANG_FORMAT="$HOME/local/bin/bin-upx/clang-format-10.0.1"
fi
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
UPX_CLANG_FORMAT="$HOME/.local/bin/bin-upx/clang-format-10.0.1"
fi
if [[ ! -f $UPX_CLANG_FORMAT ]]; then
UPX_CLANG_FORMAT="$HOME/bin/bin-upx/clang-format-10.0.1"
fi
if [[ ! -f $UPX_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 $UPX_CLANG_FORMAT
exec "$UPX_CLANG_FORMAT" -style=file "$@"
exit 1