Add emergency escape route for sclang infinite loops: USR1 signal aborts command
[supercollider.git] / setMainVersion.sh
blobb9e3e9f1b64e9059ede07c7594cfa0f6dc96f746
1 mainfile="build/SCClassLibrary/DefaultLibrary/Main.sc"
3 # Double-check that there's exactly one in each!
4 count1=$( grep -c "classvar" VERSION )
5 count2=$( grep -c "classvar scVersion" $mainfile )
6 if [ $count1 != 1 ] || [ $count2 != 1 ]; then
7 echo "ERROR in setMainVersion.sh: we require exactly one 'classvar' line to be detected. Check VERSION and Main.sc."
8 exit
9 fi
11 versionline=$( grep "classvar" VERSION )
12 line=$( grep "classvar scVersion" $mainfile )
14 echo $versionline
15 echo $line
17 sed "s/$line/$versionline/" <$mainfile >tempfile
18 cp tempfile $mainfile
19 rm tempfile