You could use grep to extract the value, bash is not too good at this kind of thing but well,
VAR=$(grep 'build=' read.txt)
You should as well using head or tail so you know that only one line will be read, otherwise your program will fail if there's more than one line matching 'build=' in your read.txt file.
VAR=$(grep 'build=' read.txt | head -n1)
Then you can strip the 'build=' substring this way:
Then it's a matter of doing the checks with if, case, or whatever you prefer.