]> err.no Git - dak/commitdiff
We really don't want environment variables to cause us to drop the wrong damn database
authorMark Hymers <mhy@debian.org>
Sun, 4 Jul 2010 16:45:04 +0000 (16:45 +0000)
committerMark Hymers <mhy@debian.org>
Sun, 4 Jul 2010 16:45:04 +0000 (16:45 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
config/debian/dinstall.functions

index 34664c7df453fae34fa5ea29c365d55bcfbf9032..fc6ad4737fe1950aaa334bc7fc2ef449baba155e 100644 (file)
@@ -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