Use context instead of global vars
This commit is contained in:
parent
1535baa68b
commit
7f5ec3ac29
13 changed files with 243 additions and 205 deletions
|
@ -2,8 +2,9 @@
|
|||
(ice-9 filesystem)
|
||||
(ordo))
|
||||
|
||||
(define* (install-aws-cli conn #:key (url "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip") update? install-dir bin-dir)
|
||||
(let ((tmp-dir (run conn "mktemp" "-d" #:return car #:check? #t)))
|
||||
(define* (install-aws-cli #:key (url "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip") update? install-dir bin-dir)
|
||||
(let* ((conn (current-connection))
|
||||
(tmp-dir (run conn "mktemp" "-d" #:return car #:check? #t)))
|
||||
(dynamic-wind
|
||||
(const #t)
|
||||
(lambda ()
|
||||
|
@ -22,8 +23,7 @@
|
|||
(play "Test play"
|
||||
#:host "localhost"
|
||||
(task "Install AWS CLI"
|
||||
(lambda (c)
|
||||
(install-aws-cli c
|
||||
#:update? #t
|
||||
(lambda ()
|
||||
(install-aws-cli #:update? #t
|
||||
#:install-dir (file-name-join* ($ #:fact.home-dir) ".local" "aws-cli")
|
||||
#:bin-dir (file-name-join* ($ #:fact.home-dir) ".local" "bin"))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue