bash script for installing postgres automatically