Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d16bf0ad5 | ||
|
|
69ac5f1cbf |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
vendor
|
||||||
gollum
|
gollum
|
||||||
public
|
public
|
||||||
**.sw*
|
**.sw*
|
||||||
|
|||||||
@@ -7,11 +7,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func getScript() string {
|
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 = `
|
const script = `#!/bin/bash
|
||||||
#!/bin/bash
|
|
||||||
function main() {
|
function main() {
|
||||||
local maxsize={{{MAXSIZE}}}
|
local maxsize={{{MAXSIZE}}}
|
||||||
if [[ "$maxsize" == 0 ]]; then
|
if [[ "$maxsize" == 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user