summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-02-20 23:46:38 +0100
committerLudovic Courtès <ludo@gnu.org>2013-02-20 23:47:16 +0100
commitf651b477b701d086402c18665eca68b26c3bec6b (patch)
treee0d9d10df8488ddd63eff3be5c3f9d3c1d66b290 /scripts
parent9bb2b96aabdbb245c4a409e96b25df2954cfe385 (diff)
Add "guix pull".
* guix/scripts/pull.scm: New file. * Makefile.am (MODULES): Add it. * doc/guix.texi (Invoking guix pull): New node. (Invoking guix package): Add cross-ref to it. * guix/ui.scm (config-directory): New procedure. * scripts/guix.in: When `GUIX_UNINSTALLED' is undefined, add $XDG_CONFIG_HOME/guix/latest to the search path. * po/POTFILES.in: Add guix/scripts/pull.scm.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/guix.in b/scripts/guix.in
index 2fdde7d13a8..1315789a9c9 100644
--- a/scripts/guix.in
+++ b/scripts/guix.in
@@ -22,7 +22,8 @@
22;; IMPORTANT: We must avoid loading any modules from Guix here, 22;; IMPORTANT: We must avoid loading any modules from Guix here,
23;; because we need to adjust the guile load paths first. 23;; because we need to adjust the guile load paths first.
24;; It's okay to import modules from core Guile though. 24;; It's okay to import modules from core Guile though.
25(use-modules (ice-9 regex)) 25(use-modules (ice-9 regex)
26 (srfi srfi-26))
26 27
27(let () 28(let ()
28 (define-syntax-rule (push! elt v) (set! v (cons elt v))) 29 (define-syntax-rule (push! elt v) (set! v (cons elt v)))
@@ -45,7 +46,14 @@
45 (unless (getenv "GUIX_UNINSTALLED") 46 (unless (getenv "GUIX_UNINSTALLED")
46 (let ((module-dir (config-lookup "guilemoduledir"))) 47 (let ((module-dir (config-lookup "guilemoduledir")))
47 (push! module-dir %load-path) 48 (push! module-dir %load-path)
48 (push! module-dir %load-compiled-path)))) 49 (push! module-dir %load-compiled-path))
50 (let ((updates-dir (and=> (or (getenv "XDG_CONFIG_HOME")
51 (and=> (getenv "HOME")
52 (cut string-append <> "/.config")))
53 (cut string-append <> "/guix/latest"))))
54 (when (file-exists? updates-dir)
55 (push! updates-dir %load-path)
56 (push! updates-dir %load-compiled-path)))))
49 57
50 (define (run-guix-main) 58 (define (run-guix-main)
51 (let ((guix-main (module-ref (resolve-interface '(guix ui)) 59 (let ((guix-main (module-ref (resolve-interface '(guix ui))