You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2009/04/18 08:10:15 UTC

svn commit: r766230 - /ofbiz/trunk/debian/ofbiz-framework.postinst

Author: doogie
Date: Sat Apr 18 06:10:15 2009
New Revision: 766230

URL: http://svn.apache.org/viewvc?rev=766230&view=rev
Log:
Add support for sub-packages to install/update extra data, by dropping
an ofbiz data xml file in /var/lib/ofbiz/import.

Modified:
    ofbiz/trunk/debian/ofbiz-framework.postinst

Modified: ofbiz/trunk/debian/ofbiz-framework.postinst
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/ofbiz-framework.postinst?rev=766230&r1=766229&r2=766230&view=diff
==============================================================================
--- ofbiz/trunk/debian/ofbiz-framework.postinst (original)
+++ ofbiz/trunk/debian/ofbiz-framework.postinst Sat Apr 18 06:10:15 2009
@@ -104,7 +104,15 @@
 				extra="$extra -file=\"$files\""
 			fi
 		fi
+	fi
+	for file in "/var/lib/ofbiz/import/"*.xml; do
+		if [ -e "$file" ]; then
+			extra="$extra -file=\"$file\""
+		fi
+	done
+	if [ "$extra" ]; then
 		eval /etc/init.d/ofbiz install $extra
+		rm -rf "/var/lib/ofbiz/import"
 	fi
 	#rm -f "$tempfile1" "$tempfile2"
 }
@@ -212,6 +220,7 @@
 		ofbiz_init_invoke stop
 		dpkg-trigger --no-await ofbiz-install
 		if [ -z "$2" ]; then
+			mkdir -p "/var/lib/ofbiz/import/"
 			if ! getent passwd ofbiz 2>/dev/null >/dev/null; then
 				adduser --quiet --group --no-create-home --system --shell /bin/sh --home /var/lib/ofbiz ofbiz
 			fi