# postgres (PostgreSQL) 10.13
# This trims it down to just the version number:
# 10.13
- echo "$(postgres --version 2>/dev/null | head -n 1 | cut -d' ' -f3)"
+ echo "$(postgres --version 2> /dev/null | head -n 1 | cut -d' ' -f3)"
}
pkg_install() {
pkg_link() {
# rm -f "$HOME/.local/opt/postgres"
rm -f "$pkg_dst"
- rm -f "$HOME/Applications/pgAdmin*.app" || true
+ rm -f "$HOME/Applications/pgAdmin"*.app || true
# ln -s "$HOME/.local/opt/postgres-v10.13" "$HOME/.local/opt/postgres"
ln -s "$pkg_src" "$pkg_dst"
chmod 0700 "$POSTGRES_DATA_DIR"
if [ ! -f "$POSTGRES_DATA_DIR/postgresql.conf" ]; then
- echo "postgres" > "$PWFILE"
- "$pkg_src/bin/initdb" \
- -D "$POSTGRES_DATA_DIR/" \
- --username postgres --pwfile "$PWFILE" \
- --auth-local=password --auth-host=password
+ echo "postgres" > "$PWFILE"
+ "$pkg_src/bin/initdb" \
+ -D "$POSTGRES_DATA_DIR/" \
+ --username postgres --pwfile "$PWFILE" \
+ --auth-local=password --auth-host=password
fi
}
echo " psql 'postgres://postgres:postgres@localhost:5432/postgres'"
echo ""
}
-