r19053 - gnucash/trunk/packaging/win32 - Replace directory mv's with cp -r when the move potentially crosses filesystem borders.

Geert Janssens gjanssens at code.gnucash.org
Fri Apr 23 08:13:39 EDT 2010


Author: gjanssens
Date: 2010-04-23 08:13:39 -0400 (Fri, 23 Apr 2010)
New Revision: 19053
Trac: http://svn.gnucash.org/trac/changeset/19053

Modified:
   gnucash/trunk/packaging/win32/install.sh
Log:
Replace directory mv's with cp -r when the move potentially crosses filesystem borders.
Apparently, Msys' mv command fails to move directories across filesystem borders (like
from a directory on the c drive to a mounted samba share).
I hit this issue because my tmp dir is on a different filesystem from
my base dir.

Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh	2010-04-22 20:45:22 UTC (rev 19052)
+++ gnucash/trunk/packaging/win32/install.sh	2010-04-23 12:13:39 UTC (rev 19053)
@@ -1171,19 +1171,21 @@
         mkdir -p $_MYSQL_LIB_UDIR
         assert_one_dir $TMP_UDIR/mysql*
         cp -r $TMP_UDIR/mysql*/* $_MYSQL_LIB_UDIR
-        mv $TMP_UDIR/mysql*/include $_MYSQL_LIB_UDIR/include/mysql
-		cd $_MYSQL_LIB_UDIR/lib
-		${DLLTOOL} --input-def $LIBMYSQL_DEF --dllname libmysql.dll --output-lib libmysqlclient.a -k
+        cp -r $TMP_UDIR/mysql*/include $_MYSQL_LIB_UDIR/include/mysql
+        rm -rf ${TMP_UDIR}/mysql*
+        qpushd $_MYSQL_LIB_UDIR/lib
+        ${DLLTOOL} --input-def $LIBMYSQL_DEF --dllname libmysql.dll --output-lib libmysqlclient.a -k
         test -f ${_MYSQL_LIB_UDIR}/lib/libmysql.dll || die "mysql not installed correctly - libmysql.dll"
         test -f ${_MYSQL_LIB_UDIR}/lib/libmysqlclient.a || die "mysql not installed correctly - libmysqlclient.a"
-        rm -rf ${TMP_UDIR}/mysql*
+        qpopd
     fi
     if test -f ${_PGSQL_UDIR}/lib/libpq.dll
     then
         echo "PGSQL library already installed.  skipping."
     else
         wget_unpacked $PGSQL_LIB_URL $DOWNLOAD_DIR $TMP_DIR
-        mv $TMP_UDIR/pgsql* $PGSQL_DIR
+        cp -r $TMP_UDIR/pgsql* $_PGSQL_UDIR
+        rm -rf ${TMP_UDIR}/pgsql*
         test -f ${_PGSQL_UDIR}/lib/libpq.dll || die "libpq not installed correctly"
     fi
     if test -f ${_LIBDBI_UDIR}/bin/libdbi-0.dll



More information about the gnucash-changes mailing list