Skip to content

Commit

Permalink
relocate create db
Browse files Browse the repository at this point in the history
  • Loading branch information
scarletg committed Nov 19, 2018
1 parent 2de004c commit c0edf5d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion batch_tests/batch_run_scripts/run-census-001.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source ../set_env.sh
c=3
while IFS=' ' read -r data model sub name count dcs max_dim location
do
./../create_db.sh ${data}_${c}
./../../create_db_ubuntu.sh ${data}_${c}
echo $location
echo $name
python hc.py -msg GL -notes $c -dataname $data -dcpath $location -dc $name -k 0.1 -w 0.01 -omit init lang occur --wlog &> ../log/census_001/runtime-${c}.log
Expand Down
2 changes: 1 addition & 1 deletion batch_tests/batch_run_scripts/run-small-adult.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ do
echo $name
for feat in init lang initsim occurattr constraint initattr freq
do
./../create_db.sh small_adult_1_s${c}
./../../create_db_ubuntu.sh small_adult_1_s${c}
python hc.py -notes s${c} -dataname small_adult_1 -dcpath $location -dc $name -k 0.1 -w 0.01 -omit $feat occur --wlog &> ../log/small_adult/omit-${feat}.log
echo $c
c=$((c+1))
Expand Down
2 changes: 1 addition & 1 deletion batch_tests/batch_run_scripts/run-small-census.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ do
echo $name
for feat in init lang initsim occurattr constraint initattr freq
do
./../create_db.sh small_census_01_v${c}
./../../create_db_ubuntu.sh small_census_01_v${c}
python hc.py -notes v${c} -dataname small_census_01 -dcpath $location -dc $name -k 0.1 -w 0.01 -omit $feat occur --wlog &> ../log/small_census/omit-${feat}.log
echo $c
c=$((c+1))
Expand Down
2 changes: 1 addition & 1 deletion batch_tests/batch_run_scripts/run-small-food.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ do
echo $name
for feat in init lang initsim occurattr constraint initattr freq
do
./../create_db.sh food_small_v${c}
./../../create_db_ubuntu.sh food_small_v${c}
python hc.py -msg validation -notes v${c} -dataname food_small -dcpath $location -dc $name -k 0.7 -w 0.01 -omit occur $feat --wlog &> ../log/small_food/omit-${feat}.log
echo $c
c=$((c+1))
Expand Down
Empty file modified create_db_unbuntu.sh
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions create_pd_user_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

sudo -u postgres psql <<PGSCRIPT
DROP database holo;
CREATE database holo;
CREATE user holocleanuser;
ALTER USER holocleanuser WITH PASSWORD 'abcd1234';
GRANT ALL PRIVILEGES on database holo to holocleanUser ;
PGSCRIPT

echo "PG database and user has been created."


0 comments on commit c0edf5d

Please sign in to comment.