mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-31 09:56:03 +00:00
Update bootstrap script
This commit is contained in:
parent
d108d099e9
commit
a86d08e538
1 changed files with 4 additions and 7 deletions
|
|
@ -3,8 +3,8 @@
|
|||
# bail on errors and unset variables
|
||||
set -euo pipefail
|
||||
|
||||
SWIFT_VERSION=5.1.3
|
||||
SWIFT_DIR=swift-$SWIFT_VERSION-RELEASE-ubuntu18.04
|
||||
SWIFT_VERSION=5.5.2
|
||||
SWIFT_DIR=swift-$SWIFT_VERSION-RELEASE-ubuntu20.04
|
||||
SWIFT_FILENAME=$SWIFT_DIR.tar.gz
|
||||
|
||||
if [[ $(uname) = "Linux" ]]; then
|
||||
|
|
@ -16,17 +16,14 @@ if [[ $(uname) = "Linux" ]]; then
|
|||
if [[ -e $SWIFT_FILENAME ]]; then
|
||||
echo "*** $SWIFT_FILENAME exists, skipping download"
|
||||
else
|
||||
wget https://swift.org/builds/swift-$SWIFT_VERSION-release/ubuntu1804/swift-$SWIFT_VERSION-RELEASE/$SWIFT_FILENAME
|
||||
wget https://swift.org/builds/swift-$SWIFT_VERSION-release/ubuntu2004/swift-$SWIFT_VERSION-RELEASE/$SWIFT_FILENAME
|
||||
fi
|
||||
if [[ -e $SWIFT_DIR ]]; then
|
||||
echo "*** $SWIFT_DIR exists, skipping extraction"
|
||||
else
|
||||
tar xzf $SWIFT_FILENAME
|
||||
fi
|
||||
if ! grep $SWIFT_DIR $HOME/.bashrc >/dev/null 2>/dev/null; then
|
||||
echo "*** adding $HOME/$SWIFT_DIR/usr/bin to PATH in $HOME/.bashrc"
|
||||
echo "export PATH=\"\$HOME/$SWIFT_DIR/usr/bin:\$PATH\"" >> $HOME/.bashrc
|
||||
fi
|
||||
echo "*** add $HOME/$SWIFT_DIR/usr/bin to PATH in your shell's rc file"
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue