You need spaces around the ==. Otherwise, you are settingpassing the string "$choice"==1 itself to if rather than comparing $choice to 1. When [ receives a string, it will evaluate to true as long as the valuestring is non-empty:
$ foo="bar"; [ $foo ] && echo true
true
$ foo=""; [ "$foo" ] && echo true ## echoes nothing
Outside the test brackets, that succeeds andin the absence of space, the variable would actually get assigned to if=1 is run. To illustrate:
$ f==3
$ echo $f
=3
$ [ 10==12 ] && echo yes
yes
As you can see above, f==3 sets the variable $f to =3. Since the assignment is successful
So, in your if block, what is being tested is a non-empty string which always evaluates to true and the if is executed. This would work:
if [ "$choice" == "1" ]
then
baseinstall
fi
Also, = or == do string comparison in bash. You want arithmetic comparison:
if [ "$choice" -eq "1" ]
then
baseinstall
fi