aboutsummaryrefslogtreecommitdiff
path: root/setup/package.sh
diff options
context:
space:
mode:
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 ..