add elisp aliases, add emacs version detection, test elixir using new executor
This commit is contained in:
parent
178d9c89f7
commit
4cb999c530
10
api/main.go
10
api/main.go
|
@ -71,7 +71,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
||||||
"cpp", "c++",
|
"cpp", "c++",
|
||||||
"csharp", "cs", "c#",
|
"csharp", "cs", "c#",
|
||||||
"elixir", "exs",
|
"elixir", "exs",
|
||||||
"elisp", "el",
|
"emacs", "elisp", "el",
|
||||||
"go",
|
"go",
|
||||||
"java",
|
"java",
|
||||||
"julia", "jl",
|
"julia", "jl",
|
||||||
|
@ -142,7 +142,9 @@ func launch(request Inbound, res http.ResponseWriter) {
|
||||||
execlang = "cpp"
|
execlang = "cpp"
|
||||||
case "cs", "c#":
|
case "cs", "c#":
|
||||||
execlang = "csharp"
|
execlang = "csharp"
|
||||||
case "elixir", "exs":
|
case "el", "elisp":
|
||||||
|
execlang = "emacs"
|
||||||
|
case "exs":
|
||||||
execlang = "elixir"
|
execlang = "elixir"
|
||||||
case "asm":
|
case "asm":
|
||||||
execlang = "nasm"
|
execlang = "nasm"
|
||||||
|
@ -236,5 +238,9 @@ func GetVersion(s string) (string, string) {
|
||||||
return "java", regexp.MustCompile("([0-9]+)").FindString(lines[2])
|
return "java", regexp.MustCompile("([0-9]+)").FindString(lines[2])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if lines[1] == "emacs" {
|
||||||
|
return "emacs", regexp.MustCompile("([0-9]+\\.[0-9]+)").FindString(lines[2])
|
||||||
|
}
|
||||||
|
|
||||||
return lines[1], regexp.MustCompile("([0-9]+\\.[0-9]+\\.[0-9]+)").FindString(s)
|
return lines[1], regexp.MustCompile("([0-9]+\\.[0-9]+\\.[0-9]+)").FindString(s)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
|
|
||||||
|
if [[ -z $(grep '[^[:space:]]' args.args) ]]; then
|
||||||
|
runuser runner$1 -c "cd /tmp/$2 ; timeout -s KILL 3 elixir code.code"
|
||||||
|
else
|
||||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args ; xargs -d '\n' timeout -s KILL 3 elixir code.code"
|
runuser runner$1 -c "cd /tmp/$2 ; cat args.args ; xargs -d '\n' timeout -s KILL 3 elixir code.code"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue