mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/scm/command-line.scm: add other env var lookups as part of
startup changes. Change bootstrap to main. (gnc:*load-path*): eliminate. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6208 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
8bd0c6e52f
commit
7e23822bb3
@ -52,16 +52,14 @@
|
|||||||
(N_ "Configuration directory - can be overridden with GNC_CONFIG_DIR environment variable.")
|
(N_ "Configuration directory - can be overridden with GNC_CONFIG_DIR environment variable.")
|
||||||
(lambda (var value) (if (string? value) (list value) #f))
|
(lambda (var value) (if (string? value) (list value) #f))
|
||||||
string=?
|
string=?
|
||||||
(if (getenv "GNC_CONFIG_DIR")
|
gnc:_install-config-dir_))
|
||||||
(getenv "GNC_CONFIG_DIR")
|
|
||||||
gnc:_config-dir-default_)))
|
|
||||||
|
|
||||||
(define gnc:*share-dir*
|
(define gnc:*share-dir*
|
||||||
(gnc:make-config-var
|
(gnc:make-config-var
|
||||||
(N_ "Shared files directory.")
|
(N_ "Shared files directory.")
|
||||||
(lambda (var value) (if (string? value) (list value) #f))
|
(lambda (var value) (if (string? value) (list value) #f))
|
||||||
string=?
|
string=?
|
||||||
gnc:_share-dir-default_))
|
gnc:_install-share-dir_))
|
||||||
|
|
||||||
;; Convert the temporary startup value into a config var.
|
;; Convert the temporary startup value into a config var.
|
||||||
(let ((current-value gnc:*debugging?*))
|
(let ((current-value gnc:*debugging?*))
|
||||||
@ -91,24 +89,6 @@
|
|||||||
eq?
|
eq?
|
||||||
#f))
|
#f))
|
||||||
|
|
||||||
;; Convert the temporary startup value into a config var.
|
|
||||||
(let ((current-load-path gnc:*load-path*))
|
|
||||||
(set!
|
|
||||||
gnc:*load-path*
|
|
||||||
(gnc:make-config-var
|
|
||||||
(N_ "A list of strings indicating the load path for (gnc:load name).
|
|
||||||
Each element must be a string representing a directory or a symbol
|
|
||||||
where 'default expands to the default path, and 'current expands to
|
|
||||||
the current value of the path.")
|
|
||||||
(lambda (var value)
|
|
||||||
(let ((result (gnc:expand-load-path value)))
|
|
||||||
(if (list? result)
|
|
||||||
(list result)
|
|
||||||
#f)))
|
|
||||||
equal?
|
|
||||||
'(default)))
|
|
||||||
(gnc:config-var-value-set! gnc:*load-path* #f current-load-path))
|
|
||||||
|
|
||||||
(define gnc:*doc-path*
|
(define gnc:*doc-path*
|
||||||
|
|
||||||
(gnc:make-config-var
|
(gnc:make-config-var
|
||||||
@ -190,19 +170,6 @@ the current value of the path.")
|
|||||||
"SHAREDIR"
|
"SHAREDIR"
|
||||||
(N_ "Set shared directory"))
|
(N_ "Set shared directory"))
|
||||||
|
|
||||||
(list "load-path"
|
|
||||||
'string
|
|
||||||
(lambda (val)
|
|
||||||
(let ((path-list
|
|
||||||
(call-with-input-string val (lambda (port) (read port)))))
|
|
||||||
(if (list? path-list)
|
|
||||||
(gnc:config-var-value-set! gnc:*load-path* #f path-list)
|
|
||||||
(begin
|
|
||||||
(gnc:error "non-list given for --load-path: " val)
|
|
||||||
(gnc:shutdown 1)))))
|
|
||||||
"LOADPATH"
|
|
||||||
(N_ "Set the search path for .scm files."))
|
|
||||||
|
|
||||||
(list "doc-path"
|
(list "doc-path"
|
||||||
'string
|
'string
|
||||||
(lambda (val)
|
(lambda (val)
|
||||||
|
Loading…
Reference in New Issue
Block a user