don't ask password on DBExport for postgresql

This commit is contained in:
Carlos Ruiz 2007-09-05 08:01:55 +00:00
parent fe8f79a3b6
commit 49c65f0d39
2 changed files with 4 additions and 0 deletions

View File

@ -9,7 +9,9 @@
@Rem Must have parameter: userAccount @Rem Must have parameter: userAccount
@if (%1) == () goto usage @if (%1) == () goto usage
@set PGPASSWORD=%2
pg_dump -U %1 %ADEMPIERE_DB_NAME% > %ADEMPIERE_HOME%\data\ExpDat.dmp pg_dump -U %1 %ADEMPIERE_DB_NAME% > %ADEMPIERE_HOME%\data\ExpDat.dmp
@set PGPASSWORD=
@cd %ADEMPIERE_HOME%\Data @cd %ADEMPIERE_HOME%\Data
@jar cvfM ExpDat.jar ExpDat.dmp @jar cvfM ExpDat.jar ExpDat.dmp

View File

@ -18,7 +18,9 @@ if [ "$ADEMPIERE_HOME" = "" -o "$ADEMPIERE_DB_NAME" = "" ]
exit 1 exit 1
fi fi
export PGPASSWORD=$2
pg_dump -U $1 $ADEMPIERE_DB_NAME > $ADEMPIERE_HOME/data/ExpDat.dmp pg_dump -U $1 $ADEMPIERE_DB_NAME > $ADEMPIERE_HOME/data/ExpDat.dmp
export PGPASSWORD=
cd $ADEMPIERE_HOME/data cd $ADEMPIERE_HOME/data
jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log jar cvfM ExpDat.jar ExpDat.dmp ExpDat.log