Rename key host to target

This commit is contained in:
Martin Puppe 2020-12-02 19:45:36 +01:00
parent 356bb03776
commit 9e3311eef2

10
secrets
View file

@ -76,10 +76,10 @@
file-contract))) file-contract)))
(define config-contract (define config-contract
(and/c (curryr dict-has-keys? '(host files)) (and/c (curryr dict-has-keys? '(target files))
(hash/dc [k (or/c 'host 'files 'basedir)] (hash/dc [k (or/c 'target 'files 'basedir)]
[v (k) (case k [v (k) (case k
[(host) string?] [(target) string?]
[(basedir) string?] [(basedir) string?]
[(files) file-list-contract])]))) [(files) file-list-contract])])))
@ -220,11 +220,11 @@ EOF
[files (map [files (map
(curryr make-file source-basedir) (curryr make-file source-basedir)
(dict-ref config 'files))] (dict-ref config 'files))]
[host (dict-ref config 'host)]) [target (dict-ref config 'target)])
(let-values ([(sp _ stdin stderr) (subprocess (let-values ([(sp _ stdin stderr) (subprocess
(current-output-port) #f #f (current-output-port) #f #f
(find-executable-path "ssh") (find-executable-path "ssh")
host target
(format (format
"bash -c '~a'" "bash -c '~a'"
(string-replace bootstrap-script (string-replace bootstrap-script