From c290b476bfda1c1fea3e4f4bae49b4695ca42592 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Mon, 24 Dec 2018 01:24:32 +0000 Subject: Combine install scripts into single script file The `getmeX.sh` scripts have all been replaced with a single script, `install.sh`, that downloads and builds all uncommon required software to the `ext` folder. Since everything is installed in `ext`, it's necessary to prepend `ext/bin` to the `PATH` to run commands. The alternative is to change the target folder in `install.sh`, or install the required dependencies manually. The Postgres database data is now stored in a folder `db` in the root of the project, instead of a folder based on the user's home. --- runmepostgres.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'runmepostgres.sh') diff --git a/runmepostgres.sh b/runmepostgres.sh index 9eee307..064ded7 100755 --- a/runmepostgres.sh +++ b/runmepostgres.sh @@ -1,10 +1,12 @@ #!/bin/bash -PGDIR=${1-"$PWD/pg"} +set -e -# read -p "Press [Enter] key to start Postgres (will already be running if you just got it) use ctl+c to cancel"; -echo "> Starting Server"; -"$PGDIR/postgres/bin/pg_ctl" -D "$PGDIR/postgres/data/" -l POSTGRES_logfile start; +BIN_DIR="$PWD/ext/bin" +PG_DATA=${1-"$PWD/db"} -# echo "> Conecting as admin user: " + ${USER}; -# "$PGDIR/postgres/bin/psql" -U ${USER} postgres; +export PATH="$BIN_DIR:$PATH" + +echo "> Starting Server" +"$BIN_DIR/pg_ctl" -D "$PG_DATA/postgres/data/" -l db.log start +echo "> Server Started" -- cgit v1.2.1