Always use the correct .databases file
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
478524b2bd
commit
56e8d3e7da
2 changed files with 5 additions and 3 deletions
|
@ -71,7 +71,7 @@ psql -d "$database" -f "$root_path"/sql/pgsnapshot_schema_0.6.sql
|
||||||
psql -d "$database" -f "$root_path"/sql/pgsnapshot_schema_0.6_bbox.sql
|
psql -d "$database" -f "$root_path"/sql/pgsnapshot_schema_0.6_bbox.sql
|
||||||
|
|
||||||
if [ ! -f ".databases" ]; then
|
if [ ! -f ".databases" ]; then
|
||||||
touch .databases
|
touch "$root_path"/.databases
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$database" >> .databases
|
echo "$database" >> "$root_path"/.databases
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
root_path="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
|
|
||||||
first=1
|
first=1
|
||||||
while [[ "$#" -gt 0 ]]
|
while [[ "$#" -gt 0 ]]
|
||||||
do
|
do
|
||||||
|
@ -44,4 +46,4 @@ esac
|
||||||
done
|
done
|
||||||
|
|
||||||
psql --dbname="postgres" -c "DROP DATABASE IF EXISTS \"$database\""
|
psql --dbname="postgres" -c "DROP DATABASE IF EXISTS \"$database\""
|
||||||
sed -ri "s/^$key$//" .databases
|
sed -ri "s/^$key$//" "$root_path"/.databases
|
||||||
|
|
Loading…
Add table
Reference in a new issue