Last active
August 29, 2015 13:57
-
-
Save dtaskoff/9714557 to your computer and use it in GitHub Desktop.
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
# a script that installs some needed software: | |
# python3.4, git, sublime and vim | |
# write sh install.sh to run the script | |
# ------------------------------------------- | |
if sudo apt-get install zlib1g-dev libssl-dev | |
then | |
echo "-------------------------------------" | |
echo "libs for pip3 successfully installed!" | |
echo "-------------------------------------" | |
else | |
echo "---------------------------" | |
echo "pip libs failed to install!" | |
echo "---------------------------" | |
exit 1 | |
fi | |
if sudo apt-get install sqlite3 libsqlite3-dev | |
then | |
echo "-------------------------------" | |
echo "sqlite3 successfully installed!" | |
echo "-------------------------------" | |
else | |
echo "--------------------------" | |
echo "sqlite3 failed to install!" | |
echo "--------------------------" | |
exit 1 | |
fi | |
if sudo apt-get install libreadline-dev | |
then | |
echo "--------------------------------" | |
echo "readline successfully installed!" | |
echo "--------------------------------" | |
else | |
echo "---------------------------" | |
echo "readline failed to install!" | |
echo "---------------------------" | |
exit 1 | |
fi | |
if wget https://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz | |
then | |
echo "---------------------------------" | |
echo "python3.4 successfully downloaded" | |
echo "---------------------------------" | |
else | |
echo "--------------------------" | |
echo "python3.4 download failed!" | |
echo "--------------------------" | |
exit 1 | |
fi | |
if tar xzf Python-3.4.0.tgz | |
then | |
echo "---------------------------------" | |
echo "python3.4 successfully extracted!" | |
echo "---------------------------------" | |
else | |
echo "----------------------------" | |
echo "python3.4 failed to extract!" | |
echo "----------------------------" | |
exit 1 | |
fi | |
cd Python-3.4.0 | |
if sudo ./configure | |
then | |
echo "---------------------------------" | |
echo "python3.4 successfully configured" | |
echo "---------------------------------" | |
else | |
echo "------------------------------" | |
echo "python3.4 failed to configure!" | |
echo "------------------------------" | |
exit 1 | |
fi | |
if sudo make | |
then | |
echo "------------------------------" | |
echo "python3.4 successfully builded" | |
echo "------------------------------" | |
else | |
echo "--------------------------" | |
echo "python3.4 failed to build!" | |
echo "--------------------------" | |
exit 1 | |
fi | |
if sudo make install | |
then | |
echo "---------------------------------" | |
echo "python3.4 successfully installed!" | |
echo "---------------------------------" | |
else | |
echo "-------------------------------------" | |
echo "python3.4 failed to install properly!" | |
echo "-------------------------------------" | |
exit 1 | |
fi | |
cd .. | |
sudo rm -r Python-3.4.0* | |
if sudo apt-get install git | |
then | |
echo "---------------------------" | |
echo "git successfully installed!" | |
echo "---------------------------" | |
else | |
echo "------------------------------" | |
echo "git couldn't install properly!" | |
echo "------------------------------" | |
exit 1 | |
fi | |
if wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py | |
then | |
echo "-------------------------------------" | |
echo "pip-installer successfully downloaded" | |
echo "-------------------------------------" | |
else | |
echo "------------------------------" | |
echo "pip-installer download failed!" | |
echo "------------------------------" | |
exit 1 | |
fi | |
if sudo python3.4 get-pip.py | |
then | |
echo "---------------------------" | |
echo "pip3 successfully installed" | |
echo "---------------------------" | |
else | |
echo "-------------------------" | |
echo "pip3 installation failed!" | |
echo "-------------------------" | |
exit 1 | |
fi | |
if sudo pip3 install virtualenv | |
then | |
echo "---------------------------------" | |
echo "virtualenv successfully installed" | |
echo "---------------------------------" | |
else | |
echo "-------------------------------" | |
echo "virtualenv installation failed!" | |
echo "-------------------------------" | |
exit 1 | |
fi | |
if sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
then | |
echo "-------------------------------" | |
echo "sublime repo successfully added" | |
echo "-------------------------------" | |
else | |
echo "---------------------------" | |
echo "failed to add sublime repo!" | |
echo "---------------------------" | |
exit 1 | |
fi | |
sudo apt-get update | |
if sudo apt-get install sublime-text-installer | |
then | |
echo "------------------------------" | |
echo "sublime successfully installed" | |
echo "------------------------------" | |
else | |
echo "-----------------------------------" | |
echo "sublime failed to install properly!" | |
echo "-----------------------------------" | |
exit 1 | |
fi | |
if sudo apt-get install vim | |
then | |
echo "---------------------------" | |
echo "vim successfully installed!" | |
echo "---------------------------" | |
else | |
echo "------------------------------" | |
echo "vim couldn't install properly!" | |
echo "------------------------------" | |
exit 1 | |
fi | |
if cp .vimrc ~/.vimrc | |
then | |
echo "------------------------------" | |
echo "vim configuration file created" | |
echo "------------------------------" | |
else | |
echo "----------------------------------------" | |
echo "vim configuration file failed to create!" | |
echo "----------------------------------------" | |
exit 1 | |
fi | |
echo "-------------------------------" | |
echo "everything installed correctly!" | |
echo "-------------------------------" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment