install java, update command

This commit is contained in:
Brian Seymour 2018-10-05 21:16:32 -05:00
parent 5d8f52afd3
commit 5efa0c603d
2 changed files with 4 additions and 3 deletions

View File

@ -18,6 +18,7 @@ RUN apt-get -y install php7.2
RUN apt-get -y install r-base
RUN apt-get -y install mono-complete
RUN apt-get -y install nasm
RUN apt-get -y install openjdk-8-jre
RUN useradd -m runner

View File

@ -1,5 +1,5 @@
cp /*.code .
name=$(cat $1 | grep -Eo 'public class ([A-Za-z0-9]+)' | cut -d' ' -f3)
mv $1 $name.java
cp /*.code interim.java
name=$(cat interim.java | grep -Eo 'public class ([A-Za-z0-9]+)' | cut -d' ' -f3)
mv interim.java $name.java
timeout -s KILL 10 javac $name.java
timeout -s KILL 3 java $name ${@:3}