diff options
author | Dale Mellor <hydro23@cdm.(none)> | 2008-01-26 10:50:59 +0000 |
---|---|---|
committer | Dale Mellor <dale@rdmp.org> | 2010-06-12 20:53:36 +0100 |
commit | 3094f9b7912ede3f5fc85d97feab1b327960df12 (patch) | |
tree | 557fadbea2047b427d71b08c5b0e0480e4e32349 /main.scm | |
parent | eb041a75325650e3953c5cc2ad70172e93283d3b (diff) | |
download | mcron-3094f9b7912ede3f5fc85d97feab1b327960df12.tar.gz mcron-3094f9b7912ede3f5fc85d97feab1b327960df12.tar.bz2 mcron-3094f9b7912ede3f5fc85d97feab1b327960df12.zip |
Allow files named on command line to have arbitrary names (assume guile input format).
Diffstat (limited to 'main.scm')
-rw-r--r-- | main.scm | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -283,15 +283,16 @@ Report bugs to " config-package-bugreport ".\n (define guile-file-regexp (make-regexp "\\.gui(le)?$")) (define vixie-file-regexp (make-regexp "\\.vix(ie)?$")) -(define (process-user-file file-path) +(define (process-user-file file-path . assume-guile) (cond ((string=? file-path "-") (if (string=? (option-ref options 'stdin "guile") "vixie") (read-vixie-port (current-input-port)) (eval-string (stdin->string)))) - ((regexp-exec guile-file-regexp file-path) - (load file-path)) + ((or (not (null? assume-guile)) + (regexp-exec guile-file-regexp file-path)) + (load file-path)) ((regexp-exec vixie-file-regexp file-path) - (read-vixie-file file-path)))) + (read-vixie-file file-path)))) @@ -368,7 +369,7 @@ Report bugs to " config-package-bugreport ".\n ((mcron) (if (null? (option-ref options '() '())) (process-files-in-user-directory) (for-each (lambda (file-path) - (process-user-file file-path)) + (process-user-file file-path #t)) (option-ref options '() '())))) ((cron) (process-files-in-system-directory) |