Working argument string split->list
This commit is contained in:
parent
de1970dbc7
commit
3db962b4aa
@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
GUILE_BIN="guile3.0"
|
GUILE_BIN="guile3.0"
|
||||||
|
|
||||||
$GUILE_BIN -s icecast-ssl-helper.scm
|
$GUILE_BIN --debug -e main -s icecast-ssl-helper.scm
|
||||||
|
@ -1,8 +1,43 @@
|
|||||||
(use-modules (ssh session))
|
(use-modules (ice-9 getopt-long)
|
||||||
|
(ice-9 rdelim)
|
||||||
|
(ssh channel)
|
||||||
|
(ssh session)
|
||||||
|
(ssh auth)
|
||||||
|
(ssh key)
|
||||||
|
(ssh version))
|
||||||
|
|
||||||
(display "Hello there.\n")
|
(define (print-help-and-exit)
|
||||||
|
"Print information about program usage."
|
||||||
|
(display
|
||||||
|
(string-append
|
||||||
|
*program-name* " -- A Helper for Icecast SSL over SSH Tunnel
|
||||||
|
Copyright (C) Equilibrate IT Inc. <admin@equilibrateit.com>
|
||||||
|
Licensed under GNU GPLv3+
|
||||||
|
|
||||||
(define (myproc x y)
|
Usage: " *program-name* " [ -upidv ] <host> <command>
|
||||||
(string-append "x is " x "\nand y is " y "\n"))
|
|
||||||
|
|
||||||
(values (myproc "7" "9"))
|
Options:
|
||||||
|
--user=<user>, -u <user> User name
|
||||||
|
--port=<port-number>, -p <port-number> Port number
|
||||||
|
--identity-file=<file>, -i <file> Path to private key
|
||||||
|
--debug, -d Debug mode
|
||||||
|
--ssh-debug=<verbosity> Debug libssh
|
||||||
|
--version, -v Print version
|
||||||
|
"))
|
||||||
|
(display "exit\n"))
|
||||||
|
|
||||||
|
(define *program-name* "icecast-ssl-helper")
|
||||||
|
(define *default-identity-file*
|
||||||
|
(string-append (getenv "HOME") "/.ssh/id_rsa"))
|
||||||
|
(define *default-log-verbosity* "nolog")
|
||||||
|
|
||||||
|
(define %accepted-key-types "ssh-rsa,rsa-sha2-256,ssh-dss,ecdh-sha2-nistp256")
|
||||||
|
|
||||||
|
(define debug? #t)
|
||||||
|
|
||||||
|
(define (main args)
|
||||||
|
(cond ((not (eq? "" args))
|
||||||
|
(display (string-split args #\ )))
|
||||||
|
(else (display "Tail sequence"))))
|
||||||
|
|
||||||
|
(main "arg1 arg2 arg3")
|
||||||
|
Loading…
Reference in New Issue
Block a user