blob: 5adf06bab52a8a5afe7421b437d1c650541a2291 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/env bash
echo "Ensure this is run from project root."
echo "Dropping database..."
if [[ "$OSTYPE" == "openbsd"* ]]; then
#doas -u _postgresql psql -f utility/drop_and_recreate.sql
psql -U postgres -f utility/drop_and_recreate.sql
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo -u postgres psql -f utility/drop_and_recreate.sql
else
echo "Cannot detect operating system"
fi
echo "Done."
|