diff options
| author | cjd24 | 2018-02-06 21:20:00 +0000 |
|---|---|---|
| committer | cjd24 | 2018-02-06 21:20:00 +0000 |
| commit | 84ef4db188b1988227feba832e5779587de42a48 (patch) | |
| tree | 47302c5f9cd8da71cbcdb817e3490ab88f856ae2 /getmepostgres.sh | |
| parent | Merge branch 'trh/node-tidy' into 'master' (diff) | |
| download | medicine-84ef4db188b1988227feba832e5779587de42a48.tar.gz medicine-84ef4db188b1988227feba832e5779587de42a48.zip | |
Filled in some of the first method stubs, added serverconfig.ts, and added script to install postgres on lab machine for doing db stuff
Diffstat (limited to 'getmepostgres.sh')
| -rwxr-xr-x | getmepostgres.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/getmepostgres.sh b/getmepostgres.sh new file mode 100755 index 0000000..05db59d --- /dev/null +++ b/getmepostgres.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +echo "> Checking for postgres at ~/pg"; +if [ -d "~/pg" ]; then + echo "Postgres Directory exists, nevermind..."; + exit 1; +fi + +echo "> Making postgres directory at ~/pg"; +mkdir ~/pg; +currentDir=$(pwd); + +echo "> Chaning dir to ~/pg"; +cd ~/pg; + +echo "> Cloning Repo"; +git clone https://github.com/postgres/postgres.git; + +echo "> Checking out to version 10"; +cd ./postgres; +git reset --hard REL_10_0; + +echo "> Configuring"; +sleep 2; +./configure --prefix=$HOME/pg/postgres/ --with-python PYTHON=/usr/bin/python2.7; + + +read -p "Press [Enter] key to Build Postgres..."; +echo "> Building Postgres"; +make -j 5; + +read -p "Press [Enter] key to Install Postgres..."; +echo "> Installing Postgres"; +make install; + +echo "> Creating the Database"; +~/pg/postgres/bin/initdb -D ~/pg/postgres/data/; + +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo "> Completed the installation of Postgres. Please use `./runmepostgres.sh` to run."; +cd $currentDir; |
