Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Python/Go switcher

By: a guest on Mar 19th, 2013  |  syntax: Bash  |  size: 0.53 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. # http://www.reddit.com/r/AppEngine/comments/1akmrp/does_installing_the_app_engine_sdk_for_both/
  3. # for TheMagicHorsey
  4.  
  5. python_server= #Path to python server
  6. go_server= #Path to go server i.e. $HOME/Dev/go_appengine/dev_appserver.py
  7.  
  8.  
  9. if [ "$1" == "python" ]
  10.         then
  11.         server_path=$python_server
  12.         echo "Switching to python..."
  13. elif [ "$1" == "go" ]
  14.         then
  15.         server_path=$go_server
  16.         echo "Switching to go..."
  17. else
  18.         echo "Valid options: python or go"
  19.         exit
  20. fi
  21.  
  22. ln -f -s $server_path /usr/local/bin/dev_appserver.py