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."
11 versionline
=$
( grep "classvar" VERSION
)
12 line
=$
( grep "classvar scVersion" $mainfile )
17 sed "s/$line/$versionline/" <$mainfile >tempfile