Changeset 29359 for other-projects


Ignore:
Timestamp:
10/09/14 17:04:18 (6 years ago)
Author:
Jeremy Symon
Message:

Change RKE Mac run script to only check for write permissions if it needs to write to the installation directory (on first run when it extracts the JRE). This allows for non-root users to run a globally installed copy of Expeditee.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/expeditee-release-kits/shared/mac/Wrapper.app/Contents/MacOS/Expeditee

    r29354 r29359  
    44cd "$BINDIR/.."
    55BASEDIR="`pwd`"
    6 if [[ -w $BASEDIR ]]; then
    7     [[ -e "$BASEDIR/Resources/jre_bin" ]] && chmod +x "$BASEDIR/Resources/jre_bin" && "$BASEDIR/Resources/jre_bin" -o"$BASEDIR/Resources" && rm "$BASEDIR/Resources/jre_bin"
    8     "$BASEDIR/Resources/jre/bin/java" -jar "$BASEDIR/Resources/Expeditee.jar"
    9 else
    10     # display error message
    11     # see: https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW11
    12     osascript -e 'tell app "System Events" to display alert "To install Expeditee, drag and drop the app wherever you would like to install it (such as the Applications folder or your desktop).\nOnce Expeditee is installed, you can close this installer window and run Expeditee by double-clicking on the installed app" as warning giving up after 10'
     6# extract JRE on first run
     7if [[ -e "$BASEDIR/Resources/jre_bin" ]]; then
     8    if [[ -w "$BASEDIR/Resources" ]]; then
     9         chmod +x "$BASEDIR/Resources/jre_bin" && "$BASEDIR/Resources/jre_bin" -o"$BASEDIR/Resources" && rm "$BASEDIR/Resources/jre_bin"
     10     else
     11        # Installation directory not writable - display error message
     12        # see: https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW11
     13        osascript -e 'tell app "System Events" to display alert "The installation directory is not writable!\nTo install Expeditee, drag and drop the app wherever you would like to install it (such as the Applications folder or your desktop).\nOnce Expeditee is installed, you can run Expeditee by double-clicking on the installed app" as warning giving up after 10'
     14        exit
     15    fi
    1316fi
     17# run expeditee
     18"$BASEDIR/Resources/jre/bin/java" -jar "$BASEDIR/Resources/Expeditee.jar"
Note: See TracChangeset for help on using the changeset viewer.