mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-04-24 00:00:04 +08:00
Formatted source
This commit is contained in:
+6
-4
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user