diff --git a/main.scm b/main.scm index 359a9bd..9b2e304 100755 --- a/main.scm +++ b/main.scm @@ -31,10 +31,9 @@ ;; end the program immediately. ;; if a message is provided, print it to the screen. ;; exit-status defaults to 1. -(define (bail . args) - (let-optionals args ((msg "") (status 1)) - (unless (equal? "" msg) (print msg)) - (exit status))) +(define (bail #!optional msg (status 1)) + (when msg (print msg)) + (exit status)) ;; decompose a path s into its constituent parts. returns values: ;; @@ -314,15 +313,14 @@ (when (file-exists? (make-pathname html-repo-path "ISSUES")) (write-with-template "ISSUES.html" (issueslist->sxml source-files-list))))) -(define (main args) - (let-optionals args ((html-repo-path "")) +(define (main #!optional html-repo-path) - (when (equal? html-repo-path "") + (unless html-repo-path (bail "please specify a destination directory for html files")) (unless (in-git-directory?) (bail "woops this isn't a git directory")) - (generate-html-files html-repo-path))) + (generate-html-files html-repo-path)) (main (command-line-arguments))