epic-ts
authorMichael Wagner <michael@wagnertech.de>
Fri, 12 Aug 2022 14:42:24 +0000 (16:42 +0200)
committerMichael Wagner <michael@wagnertech.de>
Fri, 12 Aug 2022 14:42:24 +0000 (16:42 +0200)
debian/kivitendo-mebil.changelog [new file with mode: 0644]
debian/kivitendo-mebil.control [new file with mode: 0644]
debian/kivitendo-mebil.cp [new file with mode: 0755]
debian/kivitendo-mebil.postinst [new file with mode: 0755]

diff --git a/debian/kivitendo-mebil.changelog b/debian/kivitendo-mebil.changelog
new file mode 100644 (file)
index 0000000..d84e814
--- /dev/null
@@ -0,0 +1,4 @@
+kivitendo-erp (0.1-%BUILD%) unstable; urgency=medium
+  * start of mebil mapping
+ -- Michael Wagner <info@wagnertech.de>  Tue, 08 Feb 2022 20:03:04 +0100
+
diff --git a/debian/kivitendo-mebil.control b/debian/kivitendo-mebil.control
new file mode 100644 (file)
index 0000000..adf2607
--- /dev/null
@@ -0,0 +1,13 @@
+Source: kivitendo-erp
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git,mbuild
+Package: kivitendo-mebil
+Section: main
+Priority: optional
+Architecture: all
+Depends: kivitendo
+Description: kivitendo-ERP
+
diff --git a/debian/kivitendo-mebil.cp b/debian/kivitendo-mebil.cp
new file mode 100755 (executable)
index 0000000..634c282
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+# parameter: $1: base dir for copy (optional)
+
+. debian/setenv.sh
+mkdir -p $1/opt/kivitendo-mebil
+
+ov=$(head -1 VERSION)
+
+# test release tag for original version
+git diff --stat release-$ov >git.tmp
+cat git.tmp | grep -v debian |grep -v "files changed"| grep -v ".dummy" |sed "s/ //" | sed "s/ .*//" >git.diff
+
+while read line
+do
+       path=${line%.*}
+       mkdir -p $1/opt/kivitendo-mebil/$path
+       cp $line $1/opt/kivitendo-mebil/$path/
+done <git.diff
+
+echo "$version" > $1/opt/kivitendo-mebil/VERSION_mebil
+
diff --git a/debian/kivitendo-mebil.postinst b/debian/kivitendo-mebil.postinst
new file mode 100755 (executable)
index 0000000..62e3bf4
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -ex
+
+rsync -av /opt/kivitendo-mebil/ /opt/kivitendo-erp
+
+mv=$(head -1 /opt/kivitendo-mebil/VERSION_mebil)
+if grep ":" /opt/kivitendo-erp/VERSION >/dev/null
+then
+       # kivitendo-mebil ist bereits mal installiert worden
+       sed -i "s/-.*/-$mv/" /opt/kivitendo-erp/VERSION
+else
+       # erstmalige Installation
+       sed -i "s/\([0-9].*\)/\1-$mv/" /opt/kivitendo-erp/VERSION
+fi
+