From f6e3979d1932ad32719e15c4b1a52f8bc49e2abd Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Tue, 8 Oct 2024 23:43:58 +0200 Subject: [PATCH] chore(postgres): add utility command to relink executables in osx --- snippets/postgres/commands.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snippets/postgres/commands.sh b/snippets/postgres/commands.sh index 05bb625..2bcb551 100644 --- a/snippets/postgres/commands.sh +++ b/snippets/postgres/commands.sh @@ -1,5 +1,8 @@ #!/usr/bin/env sh +find "$HOME/bin" -type 'l' \( -name "pg*" -or -name "psql" \) -exec basename {} ';' \ +| xargs -pI{} ln -sf /opt/homebrew/Cellar/postgresql@15/15.8_1/bin/{} $HOME/bin/{} + # Start DBs docker run --rm --name 'postgres' -d -p '5432:5432' -e POSTGRES_PASSWORD='password' 'postgres:14.12' docker run --rm --name 'postgis' -d -p '5432:5432' -e POSTGRES_PASSWORD='password' 'postgis/postgis:14-3.4'