Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
clpm
clpm
Commits
8dc53fc6
Commit
8dc53fc6
authored
Jan 14, 2019
by
Eric Timmons
Browse files
Better handling of CLPM_BUNDLE_BIN_PATH from clpm-live
parent
7a3a35cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
scripts/clpm-live
View file @
8dc53fc6
#
!/usr/bin/sbcl
--script
;;;; Script to load in CLPM and run its main method. -*- mode: common-lisp; -*-
#
!/bin/sh
":"
; exec sbcl --script "$0" "$@" # -*- mode: common-lisp; -*-
;;;; Script to load in CLPM and run its main method.
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
...
...
@@ -52,6 +53,9 @@
(
asdf:load-system
:clpm
)))))
(
load-clpm
))
;; Record the pathname to this script.
(
setf
clpm/utils:*live-script-location*
(
uiop:native-namestring
*load-truename*
))
;; If a REPL is requested, start 'er up
(
when
(
equal
(
uiop:getenv
"CLPM_LIVE_PRIVATE_REPL"
)
"true"
)
(
sb-impl::toplevel-repl
nil
))
...
...
src/clpm/cli/bundle/exec.lisp
View file @
8dc53fc6
...
...
@@ -10,7 +10,8 @@
#:clpm/clpmfile
#:clpm/execvpe
#:clpm/log
#:clpm/source
)
#:clpm/source
#:clpm/utils
)
(
:import-from
#:net.didierverna.clon
#:defsynopsis
#:make-context
...
...
@@ -45,7 +46,8 @@
(
log:debug
"asdf pathnames available in new process:~%~A"
asdf-pathnames
)
(
execvpe
(
first
command
)
(
rest
command
)
`
((
"CL_SOURCE_REGISTRY"
.
,
cl-source-registry-value
)
(
"CLPM_BUNDLE_BIN_PATH"
.
,
(
first
(
uiop:raw-command-line-arguments
)))
(
"CLPM_BUNDLE_BIN_PATH"
.
,
(
or
*live-script-location*
(
uiop:argv0
)))
(
"CLPM_BUNDLE_CLPMFILE"
.
,
(
uiop:native-namestring
clpmfile-pathname
))
(
"CLPM_BUNDLE_CLPMFILE_LOCK"
.
,
(
uiop:native-namestring
lockfile-pathname
)))
t
))
...
...
src/clpm/utils.lisp
View file @
8dc53fc6
...
...
@@ -7,11 +7,21 @@
(
:use
#:cl
#:puri
#:split-sequence
)
(
:export
#:run-program-augment-env-args
(
:export
#:*live-script-location*
#:run-program-augment-env-args
#:uri-to-string
))
(
in-package
#:clpm/utils
)
(
defvar
*live-script-location*
nil
"If loaded from scripts/clpm-live, this is set to the pathname where the
clpm-live script is located."
)
(
defun
clear-live-script-location
()
"On image dump, remove the pathname to the clpm-live script."
(
setf
*live-script-location*
nil
))
(
uiop:register-image-dump-hook
'clear-live-script-location
)
#+
sbcl
(
defun
run-program-augment-env-args
(
new-env-alist
)
"Given an alist of environment variables, return a list of arguments suitable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment