Commits

Peter Bex committed b0c1749

Fix commandline argument handling

Comments (0)

Files changed (1)

henrietta-cache.scm

                (else (collect-releases (cdr info) uris/releases uris)))))))
    (call-with-input-file *egg-list* read-file)))
 
+(define *short-options* '(#\h #\c #\e))
+
 (define (main args)
   (let loop ((args args))
     (if (null? args)
                  (usage 0))
                 ((or (string=? arg "-c") (string=? arg "-cache-dir"))
                  (unless (pair? (cdr args)) (usage 1))
-                 (set! *cache-dir* (cadr args))
-                 (loop (cddr args)))
-                ((or (string=? arg "-t") (string=? arg "-transport"))
-                 (unless (pair? (cdr args)) (usage 1))
-                 (set! *default-transport* (string->symbol (cadr args)))
+                 (set! *cache-directory* (cadr args))
                  (loop (cddr args)))
                 ((or (string=? arg "-e") (string=? arg "-egg-list"))
                  (unless (pair? (cdr args)) (usage 1))
                  (set! *egg-list* (string->symbol (cadr args)))
                  (loop (cddr args)))
-                ((string=? "-username" arg)
-                 (unless (pair? (cdr args)) (usage 1))
-                 (set! *username* (cadr args))
-                 (loop (cddr args)))
-                ((string=? "-password" arg)
-                 (unless (pair? (cdr args)) (usage 1))
-                 (set! *password* (cadr args))
-                 (loop (cddr args)))
-                ((string=? "-query" arg)
-                 (unless (pair? (cdr args)) (usage 1))
-                 (set! *query-string* (cadr args))
-                 (loop (cddr args)))
-                ((string=? "-remote" arg)
-                 (unless (pair? (cdr args)) (usage 1))
-                 (set! *remote-addr* (cadr args))
-                 (loop (cddr args)))
                 ((and (positive? (string-length arg))
                       (char=? #\- (string-ref arg 0)))
                  (if (> (string-length arg) 2)