feat: init

This commit is contained in:
张泊明518370910136 2024-06-29 16:03:24 -04:00
commit 36039074a3
GPG Key ID: D47306D7062CDA9D
5 changed files with 39 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
joj3_result.json

31
conf.toml Normal file
View File

@ -0,0 +1,31 @@
skipGitea = true
[[stages]]
name = "keyword"
[stages.executor]
name = "sandbox"
[stages.executor.with.default]
args = ["bash", "-c", ". ./src/lib.sh; check_files ./src/assets"]
env = ["PATH=/usr/bin:/bin:/usr/local/bin"]
cpuLimit = 10_000_000_000
memoryLimit = 104_857_600
procLimit = 50
copyInCwd = true
copyOut = ["stdout", "stderr"]
[stages.executor.with.default.stdin]
content = ""
[stages.executor.with.default.stdout]
name = "stdout"
max = 65_536
[stages.executor.with.default.stderr]
name = "stderr"
max = 65_536
[stages.parser]
name = "keyword"
[stages.parser.with]
fullScore = 100
minScore = 0
files = ["stdout"]
endOnMatch = true
[[stages.parser.with.matches]]
keyword = "check files error"
score = 5

0
src/assets/0.txt Normal file
View File

0
src/assets/1.txt Normal file
View File

7
src/lib.sh Normal file
View File

@ -0,0 +1,7 @@
# count file number in a given directory
function check_files() {
file_count=$(find $1 -type f | wc -l)
if [ $file_count -ge 1 ]; then
echo "check files error: more than 1 file found in $1!"
fi
}