>>>>> "Ed" == Ed Kademan <email@example.com> writes:
Ed> Hello Martin,
Ed> First of all, I would be happy to answer any of your questions and to
Ed> help out as much as I can. As far as I know up to now I'm the only
Ed> one who has ever used wiki-scsh, and to be honest I haven't been using
Ed> it all that much. It was something I wrote to get some experience
Ed> with scsh, so I'm sure it could stand a lot of improvement. (In
Ed> particular it seems to me that it is kind of slow.) I don't think of
Ed> myself as its "maintainer" and I think it would be difficult or
Ed> impossible for me to establish an accessible cvs repository, so if
Ed> some expert wants to take it over I won't be offended. The tar file
Ed> contains everything you need.
If you want to we could create a module for wiki-scsh in the sunet CVS
at SourceForge and add you to the developers of sunet.
Ed> But I don't want to sound like I'm anxious to wash my hands of it. At
Ed> least for now it is probably easiest for me to work on it and I am
Ed> willing to do that, or at least, answer questions.
Okay... I did not realize that wiki-scsh is a fairly new
implementation, because I overlooked the CVS dates within the
files. Sometimes in my lonely hours debugging scsh-0.6 I think no one
is using scsh at all nowadays ;-)
Ed> By the way, some time ago I fixed a slight problem with the way the
Ed> program formatted horizontal rules so after getting your message I
Ed> replaced the tarball at
Ed> with the new and improved version. If after all my caveats you still
Ed> want to use it you might want to download again.
Of course I want to!
Ed> Finally---to get to your original question---the intention of the
Ed> build procedure is to create very simple shell cgi scripts in a base
Ed> directory that call a single scsh program in the src subdirectory.
Ed> Each script invokes the scsh program in a different way. For example,
Ed> the "save.cgi" script invokes the scsh program---named "wiki"---with
Ed> an argument of "save." Basically it wants to do this
Ed> wiki -c save
Ed> The "edit.cgi" script on the other hand wants to do
Ed> wiki -c edit
Ed> The scripts actually use "exec," the complete pathname of the wiki
Ed> executable, and the "basename" utility to determine the argument so
Ed> that on my system---where the base directory is
Ed> "/home/kademan/public_html/wiki"---the save.cgi script contains
Ed> exec /home/kademan/public_html/wiki/src/wiki -c \(`basename $0 .cgi`\)
Ed> Because these simple scripts determine the argument they pass to wiki
Ed> dynamically there is no need to make them distinct. That is, the
Ed> contents of save.cgi are the same as the contents of edit.cgi and all
Ed> the other cgi files. So the makefile really only creates one cgi file
Ed> with many names (hard links).
Ed> The original perl code contained separate save.cgi, edit.cgi,
Ed> etc. scripts. I did that with scsh at first but there was so much
Ed> redundancy and the resulting executables were so big that I thought it
Ed> would be better to link everything together into one big single
Ed> executable and just invoke it in different ways. And, as I said, this
Ed> was a learning experience and I wanted to figure out how to use the
Ed> scsh linking facilities.
Yeah, now I've got it. Pretty cute... Maybe some documentation (your
lines above) in wiki-package would help ;-)
Ed> I hope this is helpful but if not let me know.
I am not that happy with the executable wiki you build. First some OS
(FreeBSD) have a limitation on the length of the #!-header and the way
you build wiki this is easily exceeded (My scsh lives in
So a /bin/sh trampoline would be better, I think.
Second I cannot build wiki at Linux at all:
scsh -lm wiki-lib.scm -lm wiki-package.scm \
-o changes -o edit -o refcount -o save -o search -o wiki \
-c '(dump-scsh "wiki.tmp")'
echo '#!/usr/local/lib/scsh/scshvm \\\n-o /usr/local/lib/scsh/scshvm -i\n' | \
cat - wiki.tmp > wiki
chmod +x wiki
rm -f ../changes.cgi ../edit.cgi ../refcount.cgi ../save.cgi ../search.cgi
printf "#!/bin/sh\nexec %s -c \(\`basename \$0 .cgi\`\)" \
`pwd`/wiki > ../.tmpcgi
printf: \(: invalid escape
make: *** [CGI] Error 1
And for FreeBSD the first line of wiki looks like this:
#!/usr/local/lib/scsh/scshvm \\\n-o /usr/local/lib/scsh/scshvm -i\n
which is probably not what you intended...