[PC-BSD Commits] r20190 - pcbsd/current/src-sh/pbi-manager
svn at pcbsd.org
svn at pcbsd.org
Mon Nov 12 10:40:21 PST 2012
Author: kris
Date: 2012-11-12 18:40:21 +0000 (Mon, 12 Nov 2012)
New Revision: 20190
Modified:
pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:
When running pbi_create copy data over to correct location
before we begin setting up scripts / desktop icons, etc.
Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-11-12 18:36:12 UTC (rev 20189)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager 2012-11-12 18:40:21 UTC (rev 20190)
@@ -3415,6 +3415,16 @@
exit_trap
fi
+ # Copy over the application to the correct location
+ echo ${PBI_PROGDIRPATH} | grep -q "^${PBI_APPDIR}/"
+ if [ $? -ne 0 ] ; then
+ newPDP="${PBI_APPDIR}/${PBI_CNAME}-${ARCH}"
+ if [ -d "${newPDP}" ] ; then exit_err "Error: ${newPDP} already exists!" ; fi
+ cp -r ${PBI_PROGDIRPATH} ${newPDP}
+ PBI_PROGDIRPATH="${newPDP}"
+ export PBI_PROGDIRPATH
+ fi
+
PBI_CREATEONLY="YES"
load_pbi_conffile
@@ -3424,6 +3434,13 @@
check_create_required_vars
do_pbi_create
+
+ # Cleanup the copy dir
+ if [ -n "$newPDP" ] ; then
+ if [ "${newPDP}" != "/" -a "${newPDP}" != "${PBI_APPDIR}/-" ] ; then
+ rm -rf "${newPDP}"
+ fi
+ fi
}
# Start the pbi_create backup process
More information about the Commits
mailing list