Skip to content

Instantly share code, notes, and snippets.

@mabdrabo
Last active December 18, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mabdrabo/5865394 to your computer and use it in GitHub Desktop.
Save mabdrabo/5865394 to your computer and use it in GitHub Desktop.
Bash script to fast forward installation of a basic Django environment. for Ubuntu.
#!/bin/bash
#Author: Mahmoud Abdrabo
#Date: 2012 Sat Aug 4, 3:06:45
clear
echo "Do you want to install missing stuff? (y,n)"
read installation
if [ "$installation" = "y" ]; then
echo -e "--------------\nupdating the system"
sudo apt-get update
echo -e "--------------\nFinished updating the system\n"
packs=("
sublime-text
sqlitebrowser
nautilus-open-terminal
libfile-mimeinfo-perl
curl
python-setuptools
pip
django
git-core
git
")
pipPacks=("
gunicorn
wsgiref
argparse
distribute
dj-database-url
")
#psycopg2
for pack in $packs
do
echo -e "--------------\ninstalling $pack"
special="false"
case $pack in
"sublime")
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
cd /usr/bin/
ln sublime-text-2 sublime
$special="true"
;;
"pip")
git clone https://github.com/pypa/pip.git
cd pip
sudo python setup.py install
cd ..
sudo rm -R pip
$special="true"
;;
"git")
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
git --version
$special="true"
;;
esac
if [ $special = "false" ]; then
sudo apt-get install $pack
fi
echo -e "--------------\nfinished installing $pack"
done
for pipPack in $pipPacks
do
echo -e "--------------\ninstalling $pipPack"
sudo pip install $pipPack
echo -e "--------------\nFinished installing $pipPack"
done
nautilus -q
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment