On Thu, Jun 14, 2012 at 12:27 AM, John Found <[email protected]> wrote:
> On Wed, 13 Jun 2012 22:47:26 +0200 > Rene <[email protected]> wrote: > > > You could make a second cgi script that will do a checkout. > > and after a commit > > do http://yoursever/checkout.cgi > > > > It has the added benefit that you can save your work from location 1. > > Go to location 2 finalize the work and publish then. > > -- > > Rene > > This is exactly what I decided to do. > I wrote the following bash CGI script in attempt to achieve this goal. > For a test I replaced "update" command with "ls" in hope to get as a > result the list of the fossil files. > --------------------------------------- > #!/bin/bash > echo "Content-type: text/html" > echo "" > echo "<html>" > echo "<head><title>Update the site from the repository.</title></head>" > echo "<body>" > echo "<pre>" > > /usr/bin/env > > /usr/local/bin/fossil ls > Add the --nocgi option to the previous command, and let us know if that works any better, please. > echo "</pre>" > echo "</body>" > echo "</html>" > --------------------------------------------- > > It was expected to list all environment variables and then to list the > files in the current checkout. > > But unfortunately, it only processed the first command and then returned > some weird result from the fossil execution: > (Note: when I start the script from the console it works as intended) > You can check the execution of this script on: > http://asm32.hopto.org/update.cgi > --------------------------------------------- > HTTP_USER_AGENT=Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 > Firefox/9.0.1 > HTTP_HOST=asm32.hopto.org > SERVER_PORT=80 > ................removed for clarity....................... > HTTP_ACCEPT_ENCODING=gzip, deflate > REQUEST_METHOD=GET > _=/usr/bin/env > > Status: 200 OK > X-Frame-Options: SAMEORIGIN > Cache-control: no-cache > Content-Type: text/html; charset=utf-8 > Content-Length: 44 > > > no such file: ls > --------------------------------------------- > > I am not very good in bash programming, so any help will be very useful. > > Regards > > -- > John Found <[email protected]> > _______________________________________________ > fossil-users mailing list > [email protected] > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

