diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-05 20:01:48 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-05 20:01:48 +1200 |
commit | c6a0dd4c75473b8ef97bd7fb914ee682435d32fd (patch) | |
tree | f1444b1e7745967154aebfe68d2a03f1fce2e7f2 /setup/package.sh | |
parent | de14dd5bff472740633b2ad598fd532a67da9f50 (diff) | |
download | trackermap-server-c6a0dd4c75473b8ef97bd7fb914ee682435d32fd.tar.gz trackermap-server-c6a0dd4c75473b8ef97bd7fb914ee682435d32fd.tar.bz2 trackermap-server-c6a0dd4c75473b8ef97bd7fb914ee682435d32fd.zip |
Update setup package script
Diffstat (limited to 'setup/package.sh')
-rwxr-xr-x | setup/package.sh | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/setup/package.sh b/setup/package.sh index 62b0f53b2..d4deed401 100755 --- a/setup/package.sh +++ b/setup/package.sh @@ -1,64 +1,63 @@ -#!/bin/sh +#!/bin/bash + +# +# Shell script to create installers +# cd $(dirname $0) -if [ $# -eq 0 ]; then - echo "Version number is not provided" - exit 0 +if [[ $# -lt 1 ]] +then + echo "USAGE: $0 <version>" + exit 1 fi # GENERAL REQUIREMENTS # Check wrapper -if ls wrapper-delta-pack-*.tar.gz 1> /dev/null 2>&1; then - echo "Java wrapper package found" -else - echo "Put wrapper-delta-pack-*.tar.gz into this directory" - exit 0 +if ! ls wrapper-delta-pack-*.tar.gz &>/dev/null +then + echo "Missing wrapper-delta-pack-*.tar.gz (http://wrapper.tanukisoftware.com/doc/english/download.jsp)" + exit 1 fi # Check Windows x64 wrapper -if ls wrapper-windows-x86-64-*.zip 1> /dev/null 2>&1; then - echo "Java wrapper package found" -else - echo "Put wrapper-windows-x86-64-*.zip (from http://www.krenger.ch/blog/tag/java-service-wrapper/) into this directory" - exit 0 +if ! ls wrapper-windows-x86-64-*.zip &>/dev/null +then + echo "Missing wrapper-windows-x86-64-*.zip (http://www.krenger.ch/blog/tag/java-service-wrapper/)" + exit 1 fi # WINDOWS REQUIREMENTS # Check inno setup -if ls isetup-*.exe 1> /dev/null 2>&1; then - echo "Inno setup installer found" -else - echo "Put isetup-*.exe into this directory" - exit 0 +if ! ls isetup-*.exe &>/dev/null +then + echo "Missing isetup-*.exe (http://www.jrsoftware.org/isdl.php)" + exit 1 fi # Check wine -if which wine > /dev/null; then - echo "Found wine" -else - echo "Install wine package" - exit 0 +if ! which wine &>/dev/null +then + echo "Missing wine package" + exit 1 fi # Check innoextract -if which innoextract > /dev/null; then - echo "Found Innoextract" -else - echo "Install innoextract package" - exit 0 +if ! which innoextract &>/dev/null +then + echo "Missing innoextract package" + exit 1 fi # LINUX REQUIREMENTS # Check makeself -if which makeself > /dev/null; then - echo "Found makeself" -else - echo "Install makeself package" - exit 0 +if ! which makeself &>/dev/null +then + echo "Install makeself package" + exit 1 fi # GENERAL PREPARATION @@ -75,7 +74,7 @@ zip -j tracker-server-$1.zip ../target/tracker-server.jar universal/README.txt # WINDOWS PACKAGE innoextract isetup-*.exe -echo "NOTE: if you got any errors here try isetup version 5.5.0 (or check what versions are supported by 'innoextract -v')" +echo "NOTE: if you got any errors here try isetup version 5.5.5 (or check what versions are supported by 'innoextract -v')" # windows 32 @@ -193,3 +192,5 @@ rm -rf out rm -rf wrapper/ rm ../web/app.min.js + +exit 0 |