Entangling two Bose–Einstein condensates in a double cavity system