Add Swift dependency to bootstrap script

This commit is contained in:
Sami Samhuri 2022-01-04 23:14:26 -08:00
parent a86d08e538
commit 034d079d3c

View file

@ -8,11 +8,28 @@ SWIFT_DIR=swift-$SWIFT_VERSION-RELEASE-ubuntu20.04
SWIFT_FILENAME=$SWIFT_DIR.tar.gz
if [[ $(uname) = "Linux" ]]; then
apt-get install \
binutils \
git \
gnupg2 \
libc6-dev \
libcurl4 \
libedit2 \
libgcc-9-dev \
libpython2.7 \
libsqlite3-0 \
libstdc++-9-dev \
libxml2 \
libz3-dev \
pkg-config \
tzdata \
uuid-dev \
zlib1g-dev
if which swift >/dev/null 2>/dev/null && swift --version | grep $SWIFT_VERSION >/dev/null 2>/dev/null; then
echo "*** swift $SWIFT_VERSION is installed"
else
echo "*** installing swift"
pushd $HOME
if [[ -e $SWIFT_FILENAME ]]; then
echo "*** $SWIFT_FILENAME exists, skipping download"
else
@ -23,8 +40,7 @@ if [[ $(uname) = "Linux" ]]; then
else
tar xzf $SWIFT_FILENAME
fi
echo "*** add $HOME/$SWIFT_DIR/usr/bin to PATH in your shell's rc file"
popd
echo "*** add $PWD/$SWIFT_DIR/usr/bin to PATH in your shell's rc file"
fi
fi