Last active
May 10, 2016 16:05
-
-
Save b4oshany/c2d87fc127822502e2785d482056954f to your computer and use it in GitHub Desktop.
Appengine Installer.
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 | |
APPENGINE_PATH=/usr/local/google_appengine | |
APPENGINE_APPCFG=/usr/local/google_appengine/appcfg.py | |
APP_PATH=$(pwd) | |
USER=$(whoami) | |
USER_HOME=/home/${USER} | |
APPENGINE_DLOAD=${USER_HOME}/google_appengine_1.9.37.zip | |
if [ -z $(which curl) ]; then \ | |
sudo apt-get install curl; \ | |
fi | |
if [ -z $(which pip) ]; then \ | |
sudo apt-get install python-pip; \ | |
sudo pip install flake8; \ | |
fi | |
if [ -z $(which virtualenv) ]; then \ | |
sudo apt-get install python-virtualenv; \ | |
fi | |
if [ ! -e "${APPENGINE_DLOAD}" ]; then \ | |
wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.37.zip -P ${USER_HOME}; \ | |
unzip ${APPENGINE_DLOAD} -d ${USER_HOME}; \ | |
fi | |
if [ ! -e "${APPENGINE_PATH}" ]; then \ | |
sudo ln -s ${USER_HOME}/google_appengine ${APPENGINE_PATH}; \ | |
fi | |
if [ -z $(which appcfg.py) ]; then \ | |
echo "Exporting appengine to path." | |
sudo echo "PATH=$PATH:${APPENGINE_PATH}" >> /etc/profile; \ | |
sudo echo "export PATH" >> /etc/profile; \ | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment