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

@ -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}