2 Commits
v1.18 ... v1.19

Author SHA1 Message Date
bel
2d16bf0ad5 ensure file size mb at least 1, fix shebang 2021-07-15 19:18:47 -06:00
Bel LaPointe
69ac5f1cbf gitignore vendor 2021-04-08 12:21:04 -05:00
2 changed files with 8 additions and 3 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
vendor
gollum
public
**.sw*

View File

@@ -7,11 +7,14 @@ import (
)
func getScript() string {
return strings.ReplaceAll(script, "{{{MAXSIZE}}}", fmt.Sprint(config.MaxSizeMB<<20))
maxSizeMB := config.MaxSizeMB
if maxSizeMB == 0 {
maxSizeMB = 1
}
return strings.ReplaceAll(script, "{{{MAXSIZE}}}", fmt.Sprint(maxSizeMB<<20))
}
const script = `
#!/bin/bash
const script = `#!/bin/bash
function main() {
local maxsize={{{MAXSIZE}}}
if [[ "$maxsize" == 0 ]]; then