X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=postgres%2Finstall.sh;h=f0336fed9f1cb2bde0a2b56faad6a301333751a9;hb=46445e9382905a52e770d44191235be179616049;hp=c21cdb7474822517be0aca0d8f2c4749942053ca;hpb=6b6a9d7a1a5824ad807d21714f1649bb9e9f2abe;p=webi-installers%2F.git diff --git a/postgres/install.sh b/postgres/install.sh index c21cdb7..f0336fe 100644 --- a/postgres/install.sh +++ b/postgres/install.sh @@ -11,7 +11,7 @@ pkg_get_current_version() { # 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() { @@ -25,7 +25,7 @@ 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" @@ -42,11 +42,11 @@ pkg_post_install() { 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 } @@ -63,4 +63,3 @@ pkg_done_message() { echo " psql 'postgres://postgres:postgres@localhost:5432/postgres'" echo "" } -