Cu+iCEcube2: "[: unexpected operator"

I have just got an Alchitry Cu and connected it via USB to the PC, which is running Ubuntu 20.04. I followed the instructions to setup the environment with iCEcube2 and Alchitry Labs. Everything seems to be working. Now I am trying to run my first FPGA project. When I hit the “build button” I am getting this error:

/home/alf/lscc/iCEcube2.2020.12/synpbase/bin/synplify_pro: 137: [: unexpected operator
Copyright (C) 1992-2014 Lattice Semiconductor Corporation. All rights reserved.
/home/alf/lscc/iCEcube2.2020.12/synpbase/bin/synplify_pro: 151: [: !=: argument expected
Child process exit with 2.
/home/alf/lscc/iCEcube2.2020.12/synpbase/bin/synplify_pro: 321: /home/alf/lscc/iCEcube2.2020.12/synpbase/bin/config/execute: Syntax error: "(" unexpected (expecting ";;")
Synthesis exit by 2.

How can I fix this?

Found a fix to this problem. See here.