diff --git a/examples/phoenix/.setup.sh b/examples/phoenix/.setup.sh index b107fd226..4a2c59360 100755 --- a/examples/phoenix/.setup.sh +++ b/examples/phoenix/.setup.sh @@ -5,8 +5,11 @@ mix local.hex --force mix local.rebar --force mix archive.install --force hex phx_new -echo y | mix phx.new --install hello +if [ ! -d "hello" ]; then + yes | mix phx.new hello + sed -i -e "s/hostname: \"localhost\"/socket_dir: System.get_env(\"PGHOST\")/" ./hello/config/dev.exs +fi pushd hello - sed -i -e "s/hostname: \"localhost\"/socket_dir: System.get_env(\"PGHOST\")/" ./config/dev.exs + mix deps.get popd