summaryrefslogtreecommitdiff
path: root/henrietta-cache.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2011-03-20 00:33:54 +0100
committerPeter Bex <peter@more-magic.net>2011-03-20 00:33:54 +0100
commit257756f811e7e7dbab06f656f89fb59d1b5f2382 (patch)
tree27e4c6a83beccc82d9d7138374a1cf1126d03093 /henrietta-cache.scm
parent57ef6c60951aee21943e61ccf9b7d5976b2ffb30 (diff)
downloadhenrietta-cache-257756f811e7e7dbab06f656f89fb59d1b5f2382.tar.gz
Fix commandline argument handling
Diffstat (limited to 'henrietta-cache.scm')
-rw-r--r--henrietta-cache.scm24
1 files changed, 3 insertions, 21 deletions
diff --git a/henrietta-cache.scm b/henrietta-cache.scm
index 1e04b92..f1efe54 100644
--- a/henrietta-cache.scm
+++ b/henrietta-cache.scm
@@ -104,6 +104,8 @@ EOF
(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)
@@ -115,32 +117,12 @@ EOF
(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)