misc/sf
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 14 Jul 2024 14:31:39 +0100
changeset 492 4ffba2f72692
parent 341 e9d5287c3107
permissions -rwxr-xr-x
updated

#!/bin/sh
###set -e

trap "exit" INT

function scala_compile {
  (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala "$1" 2> /dev/null 1> /dev/null) 
}



files=${1:-assignment2019scala-*/Part10}

name="bf.scala"

for sd in $files; do
    scalafix -r DisableSyntax --settings.DisableSyntax.noVars=true --settings.DisableSyntax.noReturns=true --settings.DisableSyntax.noWhileLoops=true $sd/$name 2> /dev/null 1> /dev/null
   ts=$(( $? )) 
   if [ $ts -ne 0 ]
   then
     echo $sd  
     echo $ts
   else
       if (scala_compile $sd/$name)
       then	  
         ts=$(( 0 ))
       else
         echo $sd  
         echo $ts  
       fi	   
   fi  
done