Last change
on this file since 30101 was 30101, checked in by ak19, 9 years ago |
Mac GS binaries will now be using the extractable jre (64 bit). Adding in the bash script 'greenstone', a modified version of Jeremy's expeditee bash script to replace the JavaApplicationStub, and modifying the Info.plist to use this instead.
|
-
Property svn:executable
set to
*
|
File size:
1.7 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | BINDIR="`dirname "$0"`"
|
---|
4 | cd "$BINDIR/.."
|
---|
5 | BASEDIR="`pwd`"
|
---|
6 |
|
---|
7 | # Debugging with a msg box. Need double quotes around msg for $var expansion
|
---|
8 | #osascript -e "tell app \"System Events\" to display alert \"bindir is: $BINDIR\" as warning giving up after 10"
|
---|
9 |
|
---|
10 | ## But this doesn't work:
|
---|
11 | # http://stackoverflow.com/questions/23923017/osascript-using-bash-variable-with-a-space
|
---|
12 | #osascript -e "display notification \"$BINDIR\""
|
---|
13 | #osascript -e 'display notification "'"$BINDIR"'"'
|
---|
14 |
|
---|
15 | # extract the JRE into /tmp and use its java to run the GS jar installer
|
---|
16 | # the /tmp/jre folder will be moved into GS3/packages by the GS3 installer
|
---|
17 |
|
---|
18 | if [[ -e "$BASEDIR/Resources/Java/jre_bin" ]]; then
|
---|
19 | if [[ -w "$BASEDIR/Resources/Java" ]]; then
|
---|
20 | chmod +x "$BASEDIR/Resources/Java/jre_bin" && "$BASEDIR/Resources/Java/jre_bin" -o"/tmp" #&& rm "$BASEDIR/Resources/Java/jre_bin"
|
---|
21 |
|
---|
22 | if [[ -e "/tmp/jre.tar" ]]; then
|
---|
23 |
|
---|
24 | # get the GS jar installer's name and run it
|
---|
25 | cd "$BASEDIR/Resources/Java/"
|
---|
26 | gs_installer=`ls Greenstone-*-MacOS-intel.jar`
|
---|
27 | tar -xvf /tmp/jre.tar -C /tmp && "/tmp/jre/bin/java" -jar "$gs_installer"
|
---|
28 | rm /tmp/jre.tar
|
---|
29 |
|
---|
30 | else
|
---|
31 | osascript -e "tell app \"System Events\" to display alert \"Unable to unpack jre into /tmp folder\" as warning giving up after 10"
|
---|
32 | fi
|
---|
33 | else
|
---|
34 | # Installation directory not writable - display error message
|
---|
35 | # see: https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW11
|
---|
36 | osascript -e 'tell app "System Events" to display alert "To install Greenstone, double-click on the installer app" as warning giving up after 10'
|
---|
37 | exit
|
---|
38 | fi
|
---|
39 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.