: ${PGPORT=50432}
export PGPORT
+testhost=`uname -o`
+
temp_root=$PWD/tmp_check
if [ "$1" = '--install' ]; then
pg_upgrade -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir"
pg_ctl start -l "$logdir/postmaster2.log" -w
-sh ./analyze_new_cluster.sh
+
+if [ $testhost = Msys ] ; then
+ cmd /c analyze_new_cluster.bat
+else
+ sh ./analyze_new_cluster.sh
+fi
pg_dumpall >"$temp_root"/dump2.sql || pg_dumpall2_status=$?
pg_ctl -m fast stop
if [ -n "$pg_dumpall2_status" ]; then
exit 1
fi
-sh ./delete_old_cluster.sh
+if [ $testhost = Msys ] ; then
+ cmd /c delete_old_cluster.bat
+else
+ sh ./delete_old_cluster.sh
+fi
+
+if [ $testhost = Msys ] ; then
+ dos2unix "$temp_root"/dump1.sql "$temp_root"/dump2.sql
+fi
if diff -q "$temp_root"/dump1.sql "$temp_root"/dump2.sql; then
echo PASSED