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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

doogie-3
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