summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-11 14:05:13 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-11 14:05:13 +0200
commitf02ddebb0c69e80f42ee95651a25c2c32521da1e (patch)
tree72d42fe23bd3e527b45f1dca91c32ec191d87fdd
parentcd63ad537e0fd30a76c4e6698bfd5043f1b91296 (diff)
Revert to the old CGI helper behaviour.
Ignore-this: b281d0b979d7679984a19b932d696ce5 darcs-hash:90286efc80b24a549a7a97f98f62f5932707223d
-rwxr-xr-xjournal-admin.cgi16
-rwxr-xr-xjournal.cgi16
-rw-r--r--main.lisp4
3 files changed, 5 insertions, 31 deletions
diff --git a/journal-admin.cgi b/journal-admin.cgi
index c743307..5fa1272 100755
--- a/journal-admin.cgi
+++ b/journal-admin.cgi
@@ -8,18 +8,4 @@ else
LISPINIT_DIR="$NFSN_SITE_ROOT/protected/journal"
fi
-mtime_of() {
- stat -n -f "%m" -t "%s" "$1" || echo -n 0
-}
-
-FASL_FILE="$LISPINIT_DIR/journal-full.fas"
-
-most_recently_changed_lisp_file=`ls -rt $DIR/*.lisp | tail -n1`
-lisp_mtime=`mtime_of $most_recently_changed_lisp_file`
-
-if ! [ -f "$FASL_FILE" -a \( `mtime_of "$FASL_FILE"` -gt $lisp_mtime \) ]; then
- env LC_ALL=de_DE.UTF-8 clisp -M "$LISPINIT_DIR/lispinit.mem.gz" "$DIR/compile.lisp" &&\
- (cd "$DIR" && cat cybertiggyr-time/time.fas xmls/xmls.fas ironclad/package.fas ironclad/macro-utils.fas ironclad/digest.fas ironclad/sha1.fas defpackage.fas macros.fas globals.fas utils.fas journal-content.fas journal.fas main.fas > "$FASL_FILE")
-fi
-
-exec env LC_ALL=de_DE.UTF-8 clisp -q -q -M "$LISPINIT_DIR/lispinit.mem.gz" -x "(progn (load \"$FASL_FILE\") (cl-user::script-main :admin-mode t))"
+exec env LC_ALL=de_DE.UTF-8 clisp -M "$LISPINIT_DIR/lispinit.mem.gz" "$DIR/run.lisp" --admin-mode
diff --git a/journal.cgi b/journal.cgi
index d9533fc..bbec698 100755
--- a/journal.cgi
+++ b/journal.cgi
@@ -8,18 +8,4 @@ else
LISPINIT_DIR="$NFSN_SITE_ROOT/protected/journal"
fi
-mtime_of() {
- stat -n -f "%m" -t "%s" "$1" || echo -n 0
-}
-
-FASL_FILE="$LISPINIT_DIR/journal-full.fas"
-
-most_recently_changed_lisp_file=`ls -rt $DIR/*.lisp | tail -n1`
-lisp_mtime=`mtime_of $most_recently_changed_lisp_file`
-
-if ! [ -f "$FASL_FILE" -a \( `mtime_of "$FASL_FILE"` -gt $lisp_mtime \) ]; then
- env LC_ALL=de_DE.UTF-8 clisp -M "$LISPINIT_DIR/lispinit.mem.gz" "$DIR/compile.lisp" &&\
- (cd "$DIR" && cat cybertiggyr-time/time.fas xmls/xmls.fas ironclad/package.fas ironclad/macro-utils.fas ironclad/digest.fas ironclad/sha1.fas defpackage.fas macros.fas globals.fas utils.fas journal-content.fas journal.fas main.fas > "$FASL_FILE")
-fi
-
-exec env LC_ALL=de_DE.UTF-8 clisp -q -q -M "$LISPINIT_DIR/lispinit.mem.gz" -x "(progn (load \"$FASL_FILE\") (cl-user::script-main))"
+exec env LC_ALL=de_DE.UTF-8 clisp -M "$LISPINIT_DIR/lispinit.mem.gz" "$DIR/run.lisp"
diff --git a/main.lisp b/main.lisp
index 8546a33..58f277d 100644
--- a/main.lisp
+++ b/main.lisp
@@ -356,4 +356,6 @@
(<:pre (<:as-html (with-output-to-string (out)
#+clisp (system::pretty-print-condition e out)
#+clisp (system::print-backtrace :out out)))))))))
- (journal-main :admin-mode admin-mode)))
+ (journal-main :admin-mode (member "--admin-mode"
+ (coerce (ext:argv) 'list)
+ :test #'string=))))