AboutSummaryRefsLogTreeCommitDiffStats
path: root/src/crontab.in
diff options
context:
space:
mode:
authorDale Mellor <mcron-lsfnyl@rdmp.org>2020-05-08 20:43:50 +0100
committerDale Mellor <mcron-lsfnyl@rdmp.org>2020-06-08 08:48:57 +0100
commit6a9bfcea4080390186be859c721e35f438d1272d (patch)
treeea6c01e4336a3209157df9ca05f175f98fe7cb8d /src/crontab.in
parentf700f299d41c8f0ecb953f1e02b8fbd432efef3d (diff)
downloadmcron-6a9bfcea4080390186be859c721e35f438d1272d.tar.gz
mcron-6a9bfcea4080390186be859c721e35f438d1272d.tar.bz2
mcron-6a9bfcea4080390186be859c721e35f438d1272d.zip
Using new Guile command-line-processor.
Diffstat (limited to 'src/crontab.in')
-rw-r--r--src/crontab.in38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/crontab.in b/src/crontab.in
index dad0dd2..f203a98 100644
--- a/src/crontab.in
+++ b/src/crontab.in
@@ -2,8 +2,44 @@
-*- scheme -*-
!#
+;;;; crontab -- run jobs at scheduled times
+;;; Copyright © 2003, 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)))
-((@ (mcron scripts crontab) main))
+(use-modules (mcron scripts crontab)
+ (ice-9 command-line-processor))
+
+(process-command-line (command-line)
+ application "crontab"
+ version "%VERSION%"
+ usage "[-u user] { -e | -l | -r }"
+ help-preamble "the default operation is to replace, per 1003.2"
+ option (--user= -u "the user whose files are to be manipulated")
+ option (--edit -e "edit this userʼs crontab")
+ option (--list -l "list this userʼs crontab")
+ option (--remove -r "delete the userʼs crontab")
+ bug-address "%PACKAGE_BUGREPORT%"
+ copyright "2003, 2016, 2020 Free Software Foundation, Inc."
+ license GPLv3)
+
+((@ (mcron scripts crontab) main) --user --edit --list --remove --!)