Last active
October 18, 2020 18:51
Star
You must be signed in to star a gist
Swift Installation Automation on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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!!!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Welcome to Swift on Linux 👋
Install
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.