Skip to content

Instantly share code, notes, and snippets.

@b4oshany
Last active May 10, 2016 16:05
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 b4oshany/c2d87fc127822502e2785d482056954f to your computer and use it in GitHub Desktop.
Save b4oshany/c2d87fc127822502e2785d482056954f to your computer and use it in GitHub Desktop.
Appengine Installer.
#!/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