.local/bin/portable-sbcl-script-test: Init.
parent
6b35571853
commit
881a517c9c
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
#|
|
||||
SYSTEMS="sbcl-alexandria sbcl-cl-str"
|
||||
|
||||
name="$(basename "$0")"
|
||||
root="$HOME/.guix-temp-profiles/$name/$name"
|
||||
guix_checkout="/var/guix/profiles/per-user/$USER/current-guix"
|
||||
|
||||
mtime () { ## TODO: Portable version?
|
||||
stat --printf=%Y "$1"
|
||||
}
|
||||
|
||||
if [ ! -e "$root" ] || \
|
||||
[ $(mtime "$guix_checkout") -gt $(mtime "$root") ]; then
|
||||
echo build
|
||||
mkdir -p "$(dirname "$root")"
|
||||
exec guix environment --root="$root" --ad-hoc sbcl $SYSTEMS lisp-repl-core-dumper -- \
|
||||
lisp-repl-core-dumper sbcl --script "$0" "$@"
|
||||
else
|
||||
exec "$root"/bin/lisp-repl-core-dumper sbcl --script "$0" "$@"
|
||||
fi
|
||||
|
||||
|#
|
||||
;; (require :asdf) ; No need if using lisp-repl-core-dumper.
|
||||
(asdf:load-system :alexandria)
|
||||
(format t "Args ~s!~%" (uiop:command-line-arguments))
|
||||
(format t "Hello ~a!~%" (alexandria:iota 1))
|
Loading…
Reference in New Issue