Skip to content

Instantly share code, notes, and snippets.

@leandrosilva
Created December 18, 2010 00:10
Show Gist options
  • Select an option

  • Save leandrosilva/745948 to your computer and use it in GitHub Desktop.

Select an option

Save leandrosilva/745948 to your computer and use it in GitHub Desktop.
web2pyrizer is just a little sugar to develop with web2py
#!/bin/sh
WEB2PY_APPDIR=/opt/web2py/applications
APPNAME=`basename $PWD`
if [ "$1" = "-d" ]; then
echo Deploying $APPNAME application to web2py server at $WEB2PY_APPDIR
ln -s $PWD $WEB2PY_APPDIR/$APPNAME;
elif [ "$1" = "-r" ]; then
echo Undeploying $APPNAME application from web2py server at $WEB2PY_APPDIR
rm $WEB2PY_APPDIR/$APPNAME;
elif [ "$1" = "-l" ]; then
echo Deployed applications on web2py server at $WEB2PY_APPDIR
echo
ls $WEB2PY_APPDIR
else
echo Usage:
echo
echo " web2pyrizer [argument]"
echo
echo Available arguments:
echo
echo " -d deploy the _current_ application to web2py server"
echo " -r undeploy the _current_ application from web2py server"
echo " -l list deployed applications on web2py server"
echo
echo "It considers that the _current_ application is just the _current_ directory. Make sure it's true."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment