It works! Thank you Jonathan.. ;-)

2009/10/31 Jonathan Lundell <[email protected]>

>
> In case anyone is interested. I use it under OS X, but it ought to
> work under any unixalike. Put it in (say) update.sh in the same
> directory as web2py/, and run it to:
>
> 1. create a snapshot of your current web2py/, renamed to its web2py
> version
> 2. download the new source version
> 3. unzip it over your existing web2py/
> 4. run the web2py application-update command
>
> Seems to work OK, ymmv, your own risk, always back up, don't come
> crying to me, etc.
>
>
> #!/bin/bash
> #
> TARGET=web2py   # web2py or a soft link to web2py
> read a VERSION c < $TARGET/VERSION
> SAVE=$TARGET-$VERSION
> URL=http://www.web2py.com/examples/static/web2py_src.zip
>
> ZIP=`basename $URL`
>
> #  Save a copy of the current version,
> #  but don't overwrite a previous save.
> #
> if [ -d $SAVE ]; then
>         echo "Rename or remove $SAVE first" >&2
>         cat $SAVE/VERSION >&2
>         exit 1
> fi
> if [ -d $TARGET ]; then
>         echo "Old version:"
>         cat $TARGET/VERSION
>         cp -R $TARGET $SAVE
> fi
> #
> #  Fetch the new version
> #
> curl -O $URL
> #
> #  Unzip into web2py
> #
> unzip -o $ZIP
> echo "New version:"
> cat $TARGET/VERSION
> #
> #  Update the web2py standard applications
> #
> python $TARGET/web2py.py --upgrade=yes
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to