diff options
| author | Frank Fischer <frank-fischer@shadow-soft.de> | 2015-04-20 13:53:40 +0200 |
|---|---|---|
| committer | Frank Fischer <frank-fischer@shadow-soft.de> | 2015-04-20 13:53:40 +0200 |
| commit | f530f8a11d23621818751318960118ddc121c37d (patch) | |
| tree | 1e12b5bd1ed59593a1c845d0f10a4e538e5fd55e /scripts | |
| parent | 3b7117fde58762d7fcfc5b8cf288d040a4acb8c2 (diff) | |
evilupdate: add -n option for not posting to the newsgroup
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/evilupdate | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/evilupdate b/scripts/evilupdate index 8efe4a2..007f546 100755 --- a/scripts/evilupdate +++ b/scripts/evilupdate @@ -143,8 +143,9 @@ The Evil developers. [2] http://melpa.org '\""))) -(defun evilupdate-update (version) - "Update Evil to VERSION." +(defun evilupdate-update (version nonews) + "Update Evil to VERSION. +If NONEWS is non-nil do not post a message to the newsgroup." (setq evilupdate-cnt 0) (setq evilupdate-version version) (evilupdate-update-emacswiki) @@ -152,11 +153,16 @@ The Evil developers. (evilupdate-update-files) (evilupdate-update-pkg) (evilupdate-update-var) - (evilupdate-update-news)) - -(when (/= (length argv) 1) - (user-error "Usage: evilupdate.el VERSION")) - -(evilupdate-update (car argv)) + (unless nonews (evilupdate-update-news))) + +(cond + ((= (length argv) 2) + (unless (= (car argv) "-n") + (user-error "Usage: evilupdate.el [-n] VERSION")) + (evilupdate-update (cadr argv) t)) + ((= (length argv) 1) + (evilupdate-update (cadr argv))) + (t + (user-error "Usage: evilupdate.el [-n] VERSION"))) ;;; evilupdate.el ends here |
