diff options
| author | Tom Harley | 2018-12-24 01:24:32 +0000 |
|---|---|---|
| committer | Tom Harley | 2018-12-24 01:24:32 +0000 |
| commit | c290b476bfda1c1fea3e4f4bae49b4695ca42592 (patch) | |
| tree | 28adedc74d8e38f89c402233c28aa12f2f652047 /runmepostgres.sh | |
| parent | Made more useful build/run scripts and instruction (diff) | |
| download | medicine-c290b476bfda1c1fea3e4f4bae49b4695ca42592.tar.gz medicine-c290b476bfda1c1fea3e4f4bae49b4695ca42592.zip | |
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.
Diffstat (limited to 'runmepostgres.sh')
| -rwxr-xr-x | runmepostgres.sh | 14 |
1 files changed, 8 insertions, 6 deletions
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" |
