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
|
||||
|
||||
if [ ! -f ".databases" ]; then
|
||||
touch .databases
|
||||
touch "$root_path"/.databases
|
||||
fi
|
||||
|
||||
echo "$database" >> .databases
|
||||
echo "$database" >> "$root_path"/.databases
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
root_path="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
|
||||
first=1
|
||||
while [[ "$#" -gt 0 ]]
|
||||
do
|
||||
|
@ -44,4 +46,4 @@ esac
|
|||
done
|
||||
|
||||
psql --dbname="postgres" -c "DROP DATABASE IF EXISTS \"$database\""
|
||||
sed -ri "s/^$key$//" .databases
|
||||
sed -ri "s/^$key$//" "$root_path"/.databases
|
||||
|
|
Loading…
Reference in a new issue