Skip to content

Instantly share code, notes, and snippets.

@hebertcisco
Last active October 18, 2020 18:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hebertcisco/554fcb86d99ab9c5fd650eb76e852a6d to your computer and use it in GitHub Desktop.
Swift Installation Automation on Ubuntu
#!/bin/bash
## By Hebert F. Barros
echo 'Removing any apt crashes...'
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock
echo 'Updating the dependencies...'
sudo apt-get update
echo 'Installing the dependencies:'
sudo apt-get install \
binutils \
git \
clang \
gnupg2 \
libc6-dev \
libcurl4 \
libedit2 \
libgcc-9-dev \
libpython2.7 \
libsqlite3-0 \
libstdc++-9-dev \
libxml2 \
libz3-dev \
pkg-config \
tzdata \
zlib1g-dev -y
echo 'Installing swift 5.2.4 release...'
cd /usr/local/
wget -c https://swift.org/builds/swift-5.2.4-release/ubuntu2004/swift-5.2.4-RELEASE/swift-5.2.4-RELEASE-ubuntu20.04.tar.gz
tar -xvf swift-5.2.4-RELEASE-ubuntu20.04.tar.gz
rm -f swift-5.2.4-RELEASE-ubuntu20.04.tar.gz
mv swift-5.2.4-RELEASE-ubuntu20.04 swift
echo 'Installing this library to avoid errors:'
sudo apt install libtinfo5 -y
echo 'Finishing...'
echo 'export PATH=$PATH:/usr/local/swift/usr/bin' >>/etc/profile
source /etc/profile
echo 'Installed!!!'
@hebertcisco
Copy link
Author

hebertcisco commented Oct 18, 2020

Welcome to Swift on Linux 👋

Version License: MIT Twitter: hebertcisco

Swift Installation Automation on Ubuntu

Install

Get root permission:

su
curl -fsSL http://bit.ly/swift-install-sh | sh

Author

👤 Hebert F Barros

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Hebert F Barros.

This project is MIT licensed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment