-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup-environment.lisp
More file actions
37 lines (32 loc) · 1.65 KB
/
setup-environment.lisp
File metadata and controls
37 lines (32 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
;;;; Setup script for Asteroid Radio Radiance environment
;;;; This creates the necessary symbolic links for the custom environment
(defun setup-asteroid-environment ()
"Set up the asteroid Radiance environment with symbolic links to project config"
(let* ((project-root (asdf:system-source-directory :asteroid))
(config-dir (merge-pathnames "config/" project-root))
(radiance-env-dir (merge-pathnames ".config/radiance/asteroid/"
(user-homedir-pathname))))
;; Ensure the radiance environment directory exists
(ensure-directories-exist radiance-env-dir)
;; Create symbolic links for each config file
(dolist (config-file '("radiance-core.conf.lisp"
"i-lambdalite.conf.lisp"
"simple-auth.conf.lisp"
"simple-sessions.conf.lisp"
"i-hunchentoot.conf.lisp"))
(let ((source (merge-pathnames config-file config-dir))
(target (merge-pathnames config-file radiance-env-dir)))
(when (probe-file target)
(delete-file target))
(when (probe-file source)
#+unix
(sb-posix:symlink (namestring source) (namestring target))
#-unix
(progn
(format t "Warning: Symbolic links not supported on this platform~%")
(format t "Please manually copy ~a to ~a~%" source target)))))
(format t "Asteroid environment setup complete!~%")
(format t "Config directory: ~a~%" config-dir)
(format t "Radiance environment: ~a~%" radiance-env-dir)))
;; Auto-setup when loaded
(setup-asteroid-environment)