2020-09-09 00:37:00 +07:00
|
|
|
#!/bin/sh
|
2021-01-03 19:06:34 +07:00
|
|
|
|
|
|
|
## before running this command you must move and rename the folder as:
|
|
|
|
# mkdir -p ../../../idempiere.gtk.linux.x86_64
|
|
|
|
# mv ../../../linux/gtk/x86_64 ../../../idempiere.gtk.linux.x86_64/idempiere-server
|
|
|
|
# cd ../../../idempiere.gtk.linux.x86_64/idempiere-server/utils/unix
|
|
|
|
# bash createDEBpackage.sh
|
|
|
|
|
2014-04-15 01:06:49 +07:00
|
|
|
TMP=/tmp
|
2020-09-09 00:37:00 +07:00
|
|
|
cd "$(dirname "$0")"/../../.. || exit
|
|
|
|
IDEMPIERE_HOME=$(pwd)
|
2014-04-15 01:06:49 +07:00
|
|
|
RWD=$IDEMPIERE_HOME/idempiere-server/utils/unix
|
2020-09-09 00:37:00 +07:00
|
|
|
PACKAGE=$(ls -d "$IDEMPIERE_HOME")
|
|
|
|
PACKAGE=$(basename "$PACKAGE")
|
2014-11-01 06:43:30 +07:00
|
|
|
# VERSION=dev
|
2020-09-09 00:37:00 +07:00
|
|
|
# TIMESTAMP=$(date +%Y%m%d)
|
2014-11-01 06:43:30 +07:00
|
|
|
# PACKFILE=$IDEMPIERE_HOME/../${PACKAGE}_${VERSION}_${TIMESTAMP}.deb
|
|
|
|
PACKFILE=$IDEMPIERE_HOME/../${PACKAGE}.deb
|
2020-09-09 00:37:00 +07:00
|
|
|
find "$RWD"/../.. -name "*.sh" -exec chmod +x {} \;
|
|
|
|
chmod +x "$RWD"/DebianInstaller/etc/init.d/idempiere
|
|
|
|
rm -f $TMP/debian-binary $TMP/control.tar.gz $TMP/data.tar.gz $TMP/control.tar $TMP/data.tar "$PACKFILE"
|
2014-04-15 01:06:49 +07:00
|
|
|
echo 2.0 > $TMP/debian-binary
|
2020-09-09 00:37:00 +07:00
|
|
|
tar cvf $TMP/control.tar -C "$RWD"/DebianInstaller/DEBIAN .
|
2014-04-15 01:06:49 +07:00
|
|
|
gzip -v -9 $TMP/control.tar
|
2020-09-09 00:37:00 +07:00
|
|
|
tar cvf $TMP/data.tar -C "$RWD"/DebianInstaller/ ./usr
|
|
|
|
tar rvf $TMP/data.tar --exclude='idempiere.gtk.linux.x86_64/idempiere-server/utils/unix/createDEBpackage.sh' --exclude='idempiere.gtk.linux.x86_64/idempiere-server/utils/unix/DebianInstaller' --transform 's:^idempiere.gtk.linux.x86_64/idempiere-server:./opt/idempiere-server:' -C "$RWD"/../../../.. "$PACKAGE" > /dev/null
|
|
|
|
tar rvf $TMP/data.tar -C "$RWD"/DebianInstaller/ ./etc
|
2014-04-15 01:06:49 +07:00
|
|
|
gzip -v -9 $TMP/data.tar
|
2020-09-09 00:37:00 +07:00
|
|
|
cd $TMP || exit
|
|
|
|
ar q "$PACKFILE" debian-binary control.tar.gz data.tar.gz
|
2014-04-15 01:06:49 +07:00
|
|
|
rm debian-binary control.tar.gz data.tar.gz
|
|
|
|
echo "Created $PACKFILE"
|