Changeset 11776 in project


Ignore:
Timestamp:
08/27/08 09:05:10 (12 years ago)
Author:
felix winkelmann
Message:

-version option for new setup tools; options for credentials

Location:
chicken/branches/hygienic
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/TODO

    r11703 r11776  
    2020
    2121** dirty-macros.scm loops when using `defile'
     22   possibly due to unrenamed special forms
    2223
    2324** modules
     
    5354
    5455* guerrilla-setup
    55 ** "-version" option for all tools
    5656** setup-download
    57 *** allow customization of svn credentials (username/password) instead of hardcoded "anonymous"
    5857*** HTTP_PROXY
    5958*** handle redirects in http-fetch
     
    6867*** document new .meta entries
    6968    depends, test-depends
    70 ** add .c/.1 files to distribution/manifest
    7169** remove all remnants of chicken-setup
    72 ** note about building setup tools with
    7370
    7471* documentation
  • chicken/branches/hygienic/chicken-install.1

    r11750 r11776  
    2828.B \-h,\ \-help     
    2929Shows a summary of options and exits.
     30
     31.TP
     32.B \-v,\ \-version
     33Shows tool version and exits.
    3034
    3135.TP
     
    9296meta property may be downloaded and installed, if necessary.
    9397
     98.TP
     99.BI \-username USERNAME
     100Set username for transports that require authentification.
     101
     102.TP
     103.BI \-password PASSWORD
     104Set password for transports that require authentification.
    94105
    95106.SH ENVIRONMENT\ VARIABLES
  • chicken/branches/hygienic/chicken-install.scm

    r11750 r11776  
    6464  (define *retrieve-only* #f)
    6565  (define *no-install* #f)
     66  (define *username* #f)
     67  (define *password* #f)
    6668
    6769  (define (load-defaults)
     
    135137                        name *default-transport* *default-location*
    136138                        version #f
    137                         (and *retrieve-only* (current-directory)))))
     139                        (and *retrieve-only* (current-directory))
     140                        *username* *password*)))
    138141             (unless dir
    139142               (error "extension or version not found"))
     
    225228usage: chicken-install [OPTION | EXTENSION[:VERSION]] ...
    226229
    227   -h   -help                    show this message
     230  -h   -help                    show this message and exit
     231  -v   -version                 show version and exit
    228232       -force                   don't ask, install even if versions don't match
    229233  -k   -keep                    keep temporary files
     
    236240       -host-extension          when cross-compiling, compile extension for host
    237241       -test                    run included test-cases, if available
     242       -username USER           set username for transports that require this
     243       -password PASS           set password for transports that require this
    238244EOF
    239245);|
    240246    (exit code))
    241247
    242   (define *short-options* '(#\h #\k #\l #\t #\s #\p #\r #\n))
     248  (define *short-options* '(#\h #\k #\l #\t #\s #\p #\r #\n #\v))
    243249
    244250  (define (main args)
     
    296302                        (set! *no-install* #t)
    297303                        (loop (cdr args) eggs))
     304                       ((or (string=? arg "-v") (string=? arg "-version"))
     305                        (print (chicken-version))
     306                        (exit 0))
    298307                       ((string=? "-test" arg)
    299308                        (set! *run-tests* #t)
     
    302311                        (set! *host-extension* #t)
    303312                        (loop (cdr args) eggs))
     313                       ((string=? "-username" arg)
     314                        (unless (pair? (cdr args)) (usage 1))
     315                        (set! *username* (cadr args))
     316                        (loop (cddr args) eggs))
     317                       ((string=? "-password" arg)
     318                        (unless (pair? (cdr args)) (usage 1))
     319                        (set! *password* (cadr args))
     320                        (loop (cddr args) eggs))
    304321                       ((and (positive? (string-length arg))
    305322                             (char=? #\- (string-ref arg 0)))
  • chicken/branches/hygienic/chicken-status.1

    r11628 r11776  
    2727
    2828.TP
     29.B \-v,\ \-version
     30Shows tool version and exits.
     31
     32.TP
    2933.B \-f,\ \-files
    30 Show files belonging to the matching extension.
     34Shows files belonging to the matching extension.
    3135
    3236
  • chicken/branches/hygienic/chicken-status.scm

    r11680 r11776  
    7373
    7474  -h   -help                    show this message
     75  -v   -version                 show version and exit
    7576  -f   -files                   list installed files
    7677EOF
     
    9596                     (set! files #t)
    9697                     (loop (cdr args) pats))
     98                    ((or (string=? arg "-v") (string=? arg "-version"))
     99                     (print (chicken-version))
     100                     (exit 0))
    97101                    ((and (positive? (string-length arg))
    98102                          (char=? #\- (string-ref arg 0)))
  • chicken/branches/hygienic/chicken-uninstall.1

    r11703 r11776  
    2626.B \-h,\ \-help     
    2727Shows a summary of options and exits.
     28
     29.TP
     30.B \-v,\ \-version
     31Shows tool version and exits.
    2832
    2933.TP
  • chicken/branches/hygienic/chicken-uninstall.scm

    r11714 r11776  
    7474usage: chicken-uninstall [OPTION | PATTERN] ...
    7575
    76   -h   -help                    show this message
     76  -h   -help                    show this message and exit
     77  -v   -version                 show version and exit
    7778       -force                   don't ask, delete whatever matches
    7879  -s   -sudo                    use sudo(1) for deleting files
     
    9293                       (string=? arg "--help"))
    9394                   (usage 0))
     95                  ((or (string=? arg "-v") (string=? arg "-version"))
     96                   (print (chicken-version))
     97                   (exit 0))
    9498                  ((string=? arg "-force")
    9599                   (set! *force* #t)
  • chicken/branches/hygienic/henrietta.cgi

    r11597 r11776  
    44export EGG_REPOSITORY=https://localhost/svn/chicken-eggs/release/4
    55export LOGFILE=/home/chicken/henrietta.log
     6export USERNAME=anonymous
     7export PASSWORD=
    68
    7 exec "$HENRIETTA" -l "$EGG_REPOSITORY" -t svn 2>>"$LOGFILE"
     9exec "$HENRIETTA" -l "$EGG_REPOSITORY" -t svn -username "$USERNAME" \
     10  -password "$PASSWORD" 2>>"$LOGFILE"
  • chicken/branches/hygienic/henrietta.scm

    r11765 r11776  
    3636  (define *default-location* (current-directory))
    3737  (define *test* #f)
     38  (define *username* #f)
     39  (define *password* #f)
    3840
    3941  (define (headers)
     
    5658                 (retrieve-extension
    5759                  name *default-transport* *default-location*
    58                   version #t))))
     60                  version #t #f
     61                  *username* *password*))))
    5962      (unless dir
    6063        (fail "no such extension or version" name version))
     
    117120  -l   -location LOCATION       install from given location (default: current directory)
    118121  -t   -transport TRANSPORT     use given transport instead of default (#{*default-transport*})
     122       -username USER           set username for transports that require this
     123       -password PASS           set password for transports that require this
    119124EOF
    120125);|
     
    140145                   (set! *default-transport* (string->symbol (cadr args)))
    141146                   (loop (cddr args)))
     147                  ((string=? "-username" arg)
     148                   (unless (pair? (cdr args)) (usage 1))
     149                   (set! *username* (cadr args))
     150                   (loop (cddr args)))
     151                  ((string=? "-password" arg)
     152                   (unless (pair? (cdr args)) (usage 1))
     153                   (set! *password* (cadr args))
     154                   (loop (cddr args)))
    142155                  ((and (positive? (string-length arg))
    143156                        (char=? #\- (string-ref arg 0)))
  • chicken/branches/hygienic/setup-download.scm

    r11765 r11776  
    5353          dir)))
    5454
    55   (define (locate-egg/local egg dir #!optional version destination)
     55  (define (locate-egg/local egg dir #!optional version destination username password)
    5656    (let* ((eggdir (make-pathname dir egg))
    5757           (files (directory eggdir))
     
    7474                eggdir)))))
    7575 
    76   (define (locate-egg/svn egg repo #!optional version destination)
     76  (define (locate-egg/svn egg repo #!optional version destination username password)
    7777    (call/cc
    7878     (lambda (k)
     
    8080         (unless (zero? (system cmd))
    8181           (k #f)))
    82        (let ((cmd (sprintf "svn ls --username=anonymous --password='' -R \"~a/~a\"" repo egg)))
     82       (let* ((uarg (if username (string-append "--username='" username "'") ""))
     83              (parg (if password (string-append "--password='" password "'") ""))
     84              (cmd (sprintf "svn ls ~a ~a -R \"~a/~a\"" uarg parg repo egg)))
    8385         (d "checking available versions ...~%  ~a~%" cmd)
    8486         (let* ((files (with-input-from-pipe cmd read-lines))
     
    103105                     ""))
    104106                (tmpdir (make-pathname (or destination (get-temporary-directory)) egg))
    105                 (cmd (sprintf "svn export --username=anonymous --password='' \"~a/~a/~a\" \"~a\" ~a"
    106                               repo egg filedir
     107                (cmd (sprintf "svn export ~a ~a \"~a/~a/~a\" \"~a\" ~a"
     108                              uarg parg repo egg filedir
    107109                              tmpdir
    108110                              (if *quiet* "1>&2" ""))))
     
    111113           tmpdir)) )))
    112114
    113   (define (locate-egg/http egg url #!optional version destination)
     115  (define (locate-egg/http egg url #!optional version destination username password)
    114116    (let* ((tmpdir (or destination (get-temporary-directory)))
    115117           (m (string-match "(http://)?([^/:]+)(:([^:/]+))?(/.+)" url))
     
    193195
    194196  (define (retrieve-extension name transport location #!optional version quiet
    195                               destination)
     197                              destination username password)
    196198    (fluid-let ((*quiet* quiet))
    197199      (case transport
     
    201203         (locate-egg/local name location version destination))
    202204        ((svn)
    203          (locate-egg/svn name location version destination))
     205         (locate-egg/svn name location version destination username password))
    204206        ((http)
    205207         (locate-egg/http name location version destination))
Note: See TracChangeset for help on using the changeset viewer.