remove bash specific stuff from shell script (regression of 08f6d7c52e5c4a67ef8dd451b9168bd1d2502cc7)