diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2016-07-02 23:00:17 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2016-07-02 23:00:17 +0200 |
commit | 7e9af4298e302a6d12dc15235033faaba6b3a15e (patch) | |
tree | a46c7a1f5e54b0592fa8470ff8aa981be9ec5854 | |
parent | 4b53493c3b6ee5554fe0a5887f672333b0da7811 (diff) | |
download | cuirass-7e9af4298e302a6d12dc15235033faaba6b3a15e.tar cuirass-7e9af4298e302a6d12dc15235033faaba6b3a15e.tar.gz |
cuirass: Remove '--use-file' command line argument.
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | bin/cuirass.in | 23 |
2 files changed, 19 insertions, 11 deletions
@@ -10,3 +10,10 @@ as described here: https://www.gnu.org/software/guix/manual/html_node/Building-from-Git.html#Building-from-Git Its modules must be found by Guile in '%load-path'. + +Example +======= + +A quick way to manually test Cuirass is to execute: + + ./pre-inst-env cuirass --interval=10 tests/hello-subset.scm diff --git a/bin/cuirass.in b/bin/cuirass.in index e086382..86058ae 100644 --- a/bin/cuirass.in +++ b/bin/cuirass.in @@ -30,11 +30,10 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" (ice-9 getopt-long)) (define* (show-help) - (simple-format #t "Usage: ~a [OPTIONS] ~%" (%program-name)) - (display "Run build jobs. + (simple-format #t "Usage: ~a [OPTIONS] SPECFILE~%" (%program-name)) + (display "Run build jobs from SPECFILE. --cache-directory=DIR Use DIR for storing repository data - -f --use-file=FILE Use FILE which defines the job to evaluate -D --database=DB Use DB to store build results. -I, --interval=N Wait N seconds between each evaluation -V, --version Display version @@ -44,7 +43,6 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@" (define %options '((cache-directory (value #t)) - (file (single-char #\f) (value #t)) (database (single-char #\f) (value #t)) (interval (single-char #\I) (value #t)) (version (single-char #\V) (value #f)) @@ -144,7 +142,8 @@ if required." ;;; (define* (main #:optional (args (command-line))) - (let ((opts (getopt-long args %options))) + (let* ((opts (getopt-long args %options)) + (specfile (option-ref opts '() '()))) (parameterize ((%program-name (car args)) (%package-database (option-ref opts 'database (%package-database))) @@ -157,13 +156,15 @@ if required." ((option-ref opts 'version #f) (show-version) (exit 0)) + ((null? specfile) + (display "You must provide a specification file as argument.~%") + (exit 1)) (else - (let* ((specfile (option-ref opts 'file "tests/hello-subset.scm")) - (interval (string->number (option-ref opts 'interval "60"))) - (specs (save-module-excursion - (λ () - (set-current-module (make-user-module)) - (primitive-load specfile))))) + (let ((interval (string->number (option-ref opts 'interval "60"))) + (specs (save-module-excursion + (λ () + (set-current-module (make-user-module)) + (primitive-load (car specfile)))))) (with-database db (while #t (process-specs db specs) |