File: install_install4j

package info (click to toggle)
triplea 1.9.0.0.7062-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 25,964 kB
  • sloc: java: 143,218; xml: 70,206; sh: 133; makefile: 7
file content (31 lines) | stat: -rwxr-xr-x 1,287 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
#
# Downloads and install install4j
# Note at the end we configure install4j with our license key. After that final step, install4j can be used.
#

if [ -z "$INSTALL4J_7_LICENSE" ]; then
 echo "Error: required license environment variable: INSTALL4J_7_LICENSE, was not set"
 exit -1
fi

echo "Downloading and installing install4j"
wget --no-verbose -O install4j_unix.sh https://raw.githubusercontent.com/triplea-game/assets/master/install4j/install4j_unix_7_0_1.sh
chmod +x install4j_unix.sh
./install4j_unix.sh -q -dir ~/install4j

## Next, append install4jHomeDir property to ~/.gradle/gradle.properties, 
## iff the property is not already present in the file
## Detailed explanation of the commands:
## The grep simply does the check if the property is there, the echo then 
## does the append, the CD subshell gets us the absolute path to the home folder,
## and last this is appended to the gradle properties file
mkdir -p ~/.gradle
grep -q "install4jHomeDir" ~/.gradle/gradle.properties 2> /dev/null \
    || echo "install4jHomeDir=$(cd ~ && pwd)/install4j" >> ~/.gradle/gradle.properties

echo "Now Running Install4j to build OS specific installers"
~/install4j/bin/install4jc -L $INSTALL4J_7_LICENSE

echo "Environment Now ready to execute 'gradle release'"
echo ""