Hmmm that error leads to next possible solution: try to change all the []-brackets into double brackets so
if [ $inst = y ] || [ $inst = Y ]
would become
if [[ $inst = y ]] || [[ $inst = Y ]]
Strange it didn’t happen for me but you can check more on Google or https://stackoverflow.com/questions/13617843/unary-operator-expected
