diff options
author | Dale Mellor <mcron-lsfnyl@rdmp.org> | 2020-05-08 20:43:50 +0100 |
---|---|---|
committer | Dale Mellor <mcron-lsfnyl@rdmp.org> | 2020-06-08 08:48:57 +0100 |
commit | 6a9bfcea4080390186be859c721e35f438d1272d (patch) | |
tree | ea6c01e4336a3209157df9ca05f175f98fe7cb8d /src/mcron.in | |
parent | f700f299d41c8f0ecb953f1e02b8fbd432efef3d (diff) | |
download | mcron-6a9bfcea4080390186be859c721e35f438d1272d.tar.gz mcron-6a9bfcea4080390186be859c721e35f438d1272d.tar.bz2 mcron-6a9bfcea4080390186be859c721e35f438d1272d.zip |
Using new Guile command-line-processor.
Diffstat (limited to 'src/mcron.in')
-rw-r--r-- | src/mcron.in | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/src/mcron.in b/src/mcron.in index 268743c..43dc326 100644 --- a/src/mcron.in +++ b/src/mcron.in @@ -2,9 +2,55 @@ -*- scheme -*- !# +;;;; mcron -- run jobs at scheduled times +;;; Copyright © 2003, 2012, 2020 Dale Mellor <mcron-lsfnyl@rdmp.org> +;;; Copyright © 2015, 2016, 2018 Mathieu Lirzin <mthl@gnu.org> +;;; +;;; This file is part of GNU Mcron. +;;; +;;; GNU Mcron is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; GNU Mcron is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Mcron. If not, see <http://www.gnu.org/licenses/>. + + (unless (getenv "MCRON_UNINSTALLED") (set! %load-path (cons "%modsrcdir%" %load-path)) (set! %load-compiled-path (cons "%modbuilddir%" %load-compiled-path))) -(use-modules (mcron scripts mcron)) -(main) +(use-modules (mcron scripts mcron) + (ice-9 command-line-processor)) + +(process-command-line (command-line) + application "mcron" + version "%VERSION%" + usage "[OPTIONS ...] [FILES ...]" + help-preamble + "Run unattended jobs according to instructions in the FILES... " + "(`-' for standard input), or use all the files in ~/.config/cron " + "(or the deprecated ~/.cron) with .guile or .vixie extensions.\n" + "Note that --daemon and --schedule are mutually exclusive." + option (--daemon -d "run as a daemon process") + option (--schedule=8 -s string->number + "display the next N (or 8) jobs that will be run," + "and then exit") + option (--stdin=guile short-i (λ (in) (or (string=? in "guile") + (string=? in "vixie"))) + "format of data passed as standard input or file " + "arguments, 'guile' or 'vixie' (default guile)") + help-postamble + "Mandatory or optional arguments to long options are also mandatory or " + "optional for any corresponding short options." + bug-address "%PACKAGE_BUGREPORT%" + copyright "2003, 2006, 2014, 2020 Free Software Foundation, Inc." + license GPLv3) + +(main --daemon --schedule --stdin --!) |