change scripts to support linux and bsds