]>
git.r.bdr.sh - rbdr/lyricli/blob - Scripts/install_swiftlint.sh
3 # Taken from: https://alexplescan.com/posts/2016/03/03/setting-up-swiftlint-on-travis-ci/
5 # Installs the SwiftLint package.
6 # Tries to get the precompiled .pkg file from Github, but if that
7 # fails just recompiles from source.
11 SWIFTLINT_PKG_PATH
="/tmp/SwiftLint.pkg"
12 SWIFTLINT_PKG_URL
="https://github.com/realm/SwiftLint/releases/download/0.18.1/SwiftLint.pkg"
14 wget
--output-document=$SWIFTLINT_PKG_PATH $SWIFTLINT_PKG_URL
16 if [ -f $SWIFTLINT_PKG_PATH ]; then
17 echo "SwiftLint package exists! Installing it..."
18 sudo installer
-pkg $SWIFTLINT_PKG_PATH -target /
20 echo "SwiftLint package doesn't exist. Compiling from source..." &&
21 git clone https
://github.com
/realm
/SwiftLint.git
/tmp
/SwiftLint
&&
23 git submodule update
--init --recursive &&