update postinstall scripts with shebang and set -eEu