Move postgres init to own script
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
|
||||
$INTERACTIVE && read -p "Create user 'sik' in PostgresSQL db (needs sudo) [y/n]?" -n 1 -r || REPLY="n"
|
||||
echo ""
|
||||
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
sudo -u postgres psql < "$PWD/init.sql"
|
||||
fi
|
||||
@@ -27,14 +27,6 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
$INTERACTIVE && read -p "Create user 'sik' in database (needs sudo) [y/n]?" -n 1 -r || REPLY="n"
|
||||
echo ""
|
||||
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
sudo -u postgres psql < "$PWD/scripts/db/init.sql"
|
||||
fi
|
||||
|
||||
$INTERACTIVE && read -p "Is virtualenv activated? [y/n]" -n 1 -r || REPLY="y"
|
||||
echo ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user