From: Mark Hymers Date: Sun, 4 Jul 2010 16:45:04 +0000 (+0000) Subject: We really don't want environment variables to cause us to drop the wrong damn database X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db90bb8627ebce54b3f7c1a4532a0b02e13eec91;p=dak We really don't want environment variables to cause us to drop the wrong damn database Signed-off-by: Mark Hymers --- diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 34664c7d..fc6ad473 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -53,11 +53,21 @@ function pgdump_post() { # Load the dak-dev projectb function pgdakdev() { + # Make sure to unset any possible psql variables so we don't drop the wrong + # f****** database by accident + local PGDATABASE + unset PGDATABASE + local PGHOST + unset PGHOST + local PGPORT + unset PGPORT + local PGUSER + unset PGUSER cd $base/backup - echo "drop database projectb" | psql -p 5433 template1 + echo "drop database projectb" | psql -p 5434 template1 #cat currentall | psql -p 5433 template1 - createdb -p 5433 -T template1 projectb - fgrep -v '\connect' current | psql -p 5433 projectb + createdb -p 5434 -T template1 projectb + fgrep -v '\connect' current | psql -p 5434 projectb } # Updating various files