feat[flags] Added backup functionality
This commit is contained in:
parent
62b11f439b
commit
b2198bd934
@ -44,3 +44,16 @@
|
||||
:manual "Add SETTING (an expression in the form Option=value) to the .system file being operated on. Multiple SETTINGs can be set by giving this option multiple times. Use 'Option=nil' to revoke a setting."
|
||||
:initial-value nil
|
||||
:reduce (adopt:flip #'cons)))
|
||||
|
||||
|
||||
(defparameter *option-backup*
|
||||
(adopt:make-option 'backup
|
||||
:parameter "LOCATION"
|
||||
:long "backup"
|
||||
:short #\b
|
||||
:help "Back up file to LOCATION before editing."
|
||||
:manual "Back up FILE to LOCATION before editiong. If no LOCATION is given, default to backing up at ./.service-backup"
|
||||
:initial-value nil
|
||||
:reduce (lambda (prev new)
|
||||
(declare (ignore prev))
|
||||
new)))
|
||||
|
@ -36,6 +36,7 @@
|
||||
(adopt:exit))
|
||||
(run (first arguments)
|
||||
:direct-settings (gethash 'setting options)
|
||||
:secure (gethash 'secure options)))
|
||||
:secure (gethash 'secure options)
|
||||
:backup (gethash 'backup options)))
|
||||
(error (c)
|
||||
(adopt:print-error-and-exit c))))
|
||||
|
@ -33,4 +33,5 @@
|
||||
*option-help*
|
||||
*option-secure*
|
||||
*option-version*
|
||||
*option-setting*)))
|
||||
*option-setting*
|
||||
*option-backup*)))
|
||||
|
@ -22,5 +22,3 @@ NewBinding=Yes
|
||||
[Install]
|
||||
Alias=dbus.service
|
||||
|
||||
ervice
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user