Formatted source

This commit is contained in:
Pierre-Olivier Latour
2020-03-15 09:35:58 -07:00
parent 45432e6563
commit df8d66f6c8
4 changed files with 65 additions and 59 deletions
+6 -4
View File
@@ -2,17 +2,19 @@
# brew install clang-format
SWIFT_FORMAT_VERSION='0.44.5'
CLANG_FORMAT_VERSION=`clang-format -version | awk '{ print $3 }'`
if [[ "$CLANG_FORMAT_VERSION" != "7.0.0" ]]; then
if [[ "$CLANG_FORMAT_VERSION" != "9.0.0" ]]; then
echo "Unsupported clang-format version"
exit 1
fi
if [[ ! -f "build/swiftformat" ]]; then
mkdir -p "build"
curl -sfL -o "build/SwiftFormat.zip" "https://github.com/nicklockwood/SwiftFormat/archive/0.37.2.zip"
unzip "build/SwiftFormat.zip" "SwiftFormat-0.37.2/CommandLineTool/swiftformat" -d "build"
mv "build/SwiftFormat-0.37.2/CommandLineTool/swiftformat" "build/swiftformat"
curl -sfL -o "build/SwiftFormat.zip" "https://github.com/nicklockwood/SwiftFormat/archive/$SWIFT_FORMAT_VERSION.zip"
unzip "build/SwiftFormat.zip" "SwiftFormat-$SWIFT_FORMAT_VERSION/CommandLineTool/swiftformat" -d "build"
mv "build/SwiftFormat-$SWIFT_FORMAT_VERSION/CommandLineTool/swiftformat" "build/swiftformat"
fi
pushd "GCDWebServer/Core"