mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +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
|
# bail on errors and unset variables
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SWIFT_VERSION=5.1.3
|
SWIFT_VERSION=5.5.2
|
||||||
SWIFT_DIR=swift-$SWIFT_VERSION-RELEASE-ubuntu18.04
|
SWIFT_DIR=swift-$SWIFT_VERSION-RELEASE-ubuntu20.04
|
||||||
SWIFT_FILENAME=$SWIFT_DIR.tar.gz
|
SWIFT_FILENAME=$SWIFT_DIR.tar.gz
|
||||||
|
|
||||||
if [[ $(uname) = "Linux" ]]; then
|
if [[ $(uname) = "Linux" ]]; then
|
||||||
|
|
@ -16,17 +16,14 @@ if [[ $(uname) = "Linux" ]]; then
|
||||||
if [[ -e $SWIFT_FILENAME ]]; then
|
if [[ -e $SWIFT_FILENAME ]]; then
|
||||||
echo "*** $SWIFT_FILENAME exists, skipping download"
|
echo "*** $SWIFT_FILENAME exists, skipping download"
|
||||||
else
|
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
|
fi
|
||||||
if [[ -e $SWIFT_DIR ]]; then
|
if [[ -e $SWIFT_DIR ]]; then
|
||||||
echo "*** $SWIFT_DIR exists, skipping extraction"
|
echo "*** $SWIFT_DIR exists, skipping extraction"
|
||||||
else
|
else
|
||||||
tar xzf $SWIFT_FILENAME
|
tar xzf $SWIFT_FILENAME
|
||||||
fi
|
fi
|
||||||
if ! grep $SWIFT_DIR $HOME/.bashrc >/dev/null 2>/dev/null; then
|
echo "*** add $HOME/$SWIFT_DIR/usr/bin to PATH in your shell's rc file"
|
||||||
echo "*** adding $HOME/$SWIFT_DIR/usr/bin to PATH in $HOME/.bashrc"
|
|
||||||
echo "export PATH=\"\$HOME/$SWIFT_DIR/usr/bin:\$PATH\"" >> $HOME/.bashrc
|
|
||||||
fi
|
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue