#!/bin/bash
#Jedes neue Paket der gleichen Version bekommt eine eigene Nummer
-NR="0"
+NR="${NR:-0}"
#hier wurde das Git-Paket entpakt:
SRC=/tmp/lx-office-erp
################################################
VER=`cat VERSION`
-DEST=$DST/lx-office-erp_$VER-$NR$1-all
+DEST=$DST/lx-office-erp_$VER-$NR$1_all
mkdir -p $DEST
cp -a $SRC/css var/lib/lx-office-erp
cp -a $SRC/templates var/lib/lx-office-erp
cp -a $SRC/users var/lib/lx-office-erp
-cp -a $SRC/xslt var/lib/lx-office-erp
cp -a $SRC/doc/* usr/share/doc/lx-office-erp/
cp -a $SRC/image/* usr/share/lx-office-erp/
find etc/ -name "*" -type f -exec md5sum {} \; >> DEBIAN/md5sum
#Größe feststellen:
-SIZE=`du -scb . | grep insgesamt | cut -f1`
+SIZE=`du -scb . | tail -n 1 | cut -f1`
#Controlfile updaten:
sed --in-place --expression "s/Installed-Size: 0/Installed-Size: $SIZE/g" DEBIAN/control