Namensgebung accrual/cash für Soll-/Ist-Versteuerung angepasst
[kivitendo-erp.git] / DEBIAN / DEBIAN / preinst
index 1d39870..66dd4e3 100755 (executable)
@@ -1,15 +1,22 @@
 #!/bin/sh
 #Nur für das Update von einer 2.6.0 nötig, da hier gnadenlos gelöscht wird
-set -e
+#set -x
+
+(
 echo " ! "`date`" Preinst $1 !" >> /tmp/lxo-erp.log
+)
 
 if [ "$1" = "upgrade" ]; then
+    echo " ! upgrade !" >> /tmp/lxo-erp.log
     cnt=`grep -c '\-e /usr/lib/lx-office-erp' /var/lib/dpkg/info/lx-office-erp.postrm`
-    if ! [ $cnt == 0 ]; then
+    echo " ! $cnt !" >> /tmp/lxo-erp.log
+    if [ $cnt -gt 0 ]; then
         echo "#!/bin/sh" > /var/lib/dpkg/info/lx-office-erp.postrm
         echo "set -e" >> /var/lib/dpkg/info/lx-office-erp.postrm
         echo "echo ' ! '`date`' postrm2 $1 !'" >> /var/lib/dpkg/info/lx-office-erp.postrm
         chmod +x /var/lib/dpkg/info/lx-office-erp.postrm
+    else
+        echo " ! ok !" >> /tmp/lxo-erp.log
     fi
 fi