mirror of git://bitreich.org/reed-alert
Better launcher experience
This commit is contained in:
parent
8e5ebef8af
commit
ddc902f546
|
@ -1,4 +1,6 @@
|
|||
(require 'asdf)
|
||||
;;; let's hide the loading
|
||||
(let ((*standard-output* (make-broadcast-stream)))
|
||||
(require 'asdf))
|
||||
|
||||
(defparameter *tries* 3)
|
||||
(defparameter *alerts* '())
|
||||
|
@ -139,5 +141,6 @@
|
|||
(format stream-out "~a~%~a~%" (+ 1 tries) params))
|
||||
nil)))))
|
||||
|
||||
;; abort when using ctrl+c instead of dropping to debugger
|
||||
#+ecl
|
||||
(ext:set-signal-handler ext:+sigint+ nil)
|
||||
(ext:set-signal-handler ext:+sigint+ #'quit)
|
||||
|
|
|
@ -3,20 +3,22 @@
|
|||
REEDDIR=
|
||||
|
||||
# check for ecl
|
||||
type ecl 2>/dev/null
|
||||
type ecl 2>&1 >/dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
LISP="ecl"
|
||||
PARAMS="--norc"
|
||||
LOADPARAM="-load"
|
||||
SHELLPARAM="-shell"
|
||||
else
|
||||
# check for sbcl if ecl not in PATH
|
||||
type sbcl 2>/dev/null
|
||||
type sbcl 2>&1 >/dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
LISP="sbcl"
|
||||
LOADPARAM="--load"
|
||||
SHELLPARAM="--shell"
|
||||
PARAMS="--noinform --no-userinit"
|
||||
LOADPARAM="--script"
|
||||
SHELLPARAM="--script"
|
||||
else
|
||||
echo "ecl or sbcl not found in PATH."
|
||||
echo "you need at least one of them to use reed-alert"
|
||||
|
@ -24,6 +26,16 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
$LISP $LOADPARAM $REEDDIR/functions.lisp \
|
||||
$LOADPARAM $REEDDIR/probes.lisp \
|
||||
$SHELLPARAM $1
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "usage: $0 filename"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# prevent interpreter output when loading files
|
||||
$LISP $PARAMS --eval \
|
||||
"(let ((*standard-output* (make-broadcast-stream)))
|
||||
(require 'asdf)
|
||||
(load \"$REEDDIR/functions.lisp\")
|
||||
(load \"$REEDDIR/probes.lisp\"))" \
|
||||
$SHELLPARAM $1
|
||||
|
|
Loading…
Reference in New Issue