-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.ss
37 lines (30 loc) · 920 Bytes
/
config.ss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
```code
* Update /config gists *
* Usage: x run config.ss <id>? *
{{
{
docker: '54fbb66fa39740ad1c865a59b5ed2e31',
nginx: '38a125eede8228ddf40651e2529a5c70',
supervisor: '2db295508517a4eed59906320e95d98a',
}
| to => gistMap
}}
[] | to => optional
[] | to => ignore
(ARGV.Length > 0 ? ARGV : gistMap.Keys) | to => keys
#each id in keys
gistMap[id] | to => gistId
{} | to => files
vfsFileSystem(`config/${id}`) | to => fs
#each file in fs.allFiles()
file.VirtualPath.replace('/','\\') | to => key
(optional.contains(key) ? `${key}?` : key) | to => key
#if !ignore.contains(key)
files.putItem(key, file.fileContents()) | end
/if
/each
`Writing to ${files.count()} files to ${id} ${gistId} ...`
vfsGist(gistId, 'GISTLYN_TOKEN'.envVariable()) | to => gist
gist.writeFiles(files)
/each
```