[PC-BSD Commits] r20456 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Mon Dec 10 10:01:37 PST 2012


Author: kris
Date: 2012-12-10 18:01:37 +0000 (Mon, 10 Dec 2012)
New Revision: 20456

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Add new hook script: pre-pbicreate.sh



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-12-10 17:51:21 UTC (rev 20455)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-12-10 18:01:37 UTC (rev 20456)
@@ -3510,6 +3510,7 @@
 	clean_icons_dir
 	mk_xdg_scripts
 
+	run_pbi_prepkgscript
 
 	mk_install_script
 	mk_deinstall_script
@@ -4857,6 +4858,21 @@
 	fi
 }
 
+# Checks if we have a custom script to run prior to pbi create
+run_pbi_prepkgscript()
+{
+  	if [ ! -d "${PBI_CONFDIR}" ] ; then return 0 ; fi
+  	if [ ! -d "${PBI_CONFDIR}/${PBI_CONF_SCRIPTSDIR}" ] ; then return 0 ; fi
+  	if [ ! -e "${PBI_CONFDIR}/${PBI_CONF_SCRIPTSDIR}/pre-pbicreate.sh" ] ; then return 0 ; fi
+
+	export_script_vars
+
+	sh "${PBI_CONFDIR}/${PBI_CONF_SCRIPTSDIR}/pre-pbicreate.sh"
+	if [ "$?" != "0" ] ; then
+		echo "Warning: post-portmake.sh returned non-0 status!"
+	fi
+}
+
 # Begins the port make
 start_pbi_makeport()
 {



More information about the Commits mailing list