Peter Bex avatar 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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.