aboutsummaryrefslogtreecommitdiff
path: root/setup/package.sh
diff options
context:
space:
mode:
authorPhilipp Prangenberg <philipp.prangenberg@derkurier.de>2016-12-05 12:03:08 +0100
committerPhilipp Prangenberg <philipp.prangenberg@derkurier.de>2016-12-05 12:03:08 +0100
commita21f436a58133f7da0cae06366d729665f3b8f9c (patch)
tree72ff1743d96f79e4a9d85b0d48715e5f9aa67cf9 /setup/package.sh
parent960bf899414d89221e92138fdb98777c3f4f73ec (diff)
parent40607036c5aa6385a7ae3f3a283bf107238a5944 (diff)
downloadtrackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.tar.gz
trackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.tar.bz2
trackermap-server-a21f436a58133f7da0cae06366d729665f3b8f9c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'setup/package.sh')
-rwxr-xr-xsetup/package.sh23
1 files changed, 13 insertions, 10 deletions
diff --git a/setup/package.sh b/setup/package.sh
index acbac434b..a6b54717d 100755
--- a/setup/package.sh
+++ b/setup/package.sh
@@ -23,18 +23,19 @@ check_requirement () {
}
check_requirement "ls ../../ext-6.0.1" "Missing ../../ext-6.0.1 (https://www.sencha.com/legal/GPL/)"
-check_requirement "ls yajsw-*.zip" "Missing yajsw-*.zip (http://yajsw.sourceforge.net/)"
+check_requirement "ls yajsw-*.zip" "Missing yajsw-*.zip (https://sourceforge.net/projects/yajsw/files/)"
check_requirement "ls innosetup-*.exe" "Missing isetup-*.exe (http://www.jrsoftware.org/isdl.php)"
check_requirement "which sencha" "Missing sencha cmd package (https://www.sencha.com/products/extjs/cmd-download/)"
check_requirement "which wine" "Missing wine package"
check_requirement "which innoextract" "Missing innoextract package"
check_requirement "which makeself" "Missing makeself package"
+check_requirement "which dos2unix" "Missing dos2unix package"
prepare () {
unzip yajsw-*.zip
mv yajsw-*/ yajsw/
- ../web/../tools/minify.sh
+ ../traccar-web/tools/minify.sh
innoextract innosetup-*.exe
echo "If you got any errors here try isetup version 5.5.5 (or check supported versions using 'innoextract -v')"
@@ -43,7 +44,7 @@ prepare () {
cleanup () {
rm -r yajsw/
- rm ../web/app.min.js
+ rm ../traccar-web/web/app.min.js
rm -r app/
}
@@ -70,12 +71,10 @@ copy_wrapper () {
echo "wrapper.ntservice.name=traccar" >> out/conf/wrapper.conf
echo "wrapper.ntservice.displayname=Traccar" >> out/conf/wrapper.conf
echo "wrapper.ntservice.description=Traccar" >> out/conf/wrapper.conf
+ echo "wrapper.daemon.run_level_dir=\${if (new File('/etc/rc0.d').exists()) return '/etc/rcX.d' else return '/etc/init.d/rcX.d'}" >> out/conf/wrapper.conf
- cp -r yajsw/lib/core out/lib
- rm out/lib/core/ReadMe.txt
-
- cp -r yajsw/lib/extended out/lib
- rm out/lib/extended/ReadMe.txt
+ cp -r yajsw/lib/* out/lib
+ find out/lib -type f -name ReadMe.txt -exec rm -f {} \;
cp yajsw/templates/* out/templates
@@ -91,7 +90,9 @@ copy_files () {
cp ../target/tracker-server.jar out
cp ../target/lib/* out/lib
cp ../schema/* out/schema
- cp -r ../web/* out/web
+ cp -r ../templates/* out/templates
+ cp -r ../traccar-web/web/* out/web
+ cp default.xml out/conf
cp traccar.xml out/conf
}
@@ -114,6 +115,7 @@ package_unix () {
mkdir -p out/{bin,conf,data,lib,logs,web,schema,templates}
copy_wrapper "bin"
+ find out -type f \( -name \*.sh -o -name \*.vm \) -print0 | xargs -0 dos2unix
copy_files
makeself out traccar.run "traccar" "\
@@ -145,7 +147,8 @@ package_universal () {
copy_files
cp README.txt out
-
+ cp other/traccar.sh out
+
cd out
zip -r ../traccar-other-$VERSION.zip *
cd ..