ZeroTierOne/ext/opentelemetry-cpp-1.21.0/tools/git-cl.sh
2025-07-11 10:37:21 -07:00

20 lines
348 B
Bash
Executable file

#!/bin/sh
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
set -e
if [ "format" = "$1" ]; then
if [ -z "$2" ]; then
echo Please specify file name.
exit
fi
if [ -f "$2" ]; then
FILEPATH=$2
else
FILEPATH=${GIT_PREFIX}$2
fi
echo Formatting $FILEPATH
clang-format -style=file -i $FILEPATH
fi