make scripts POSIX compliant