3 JVM=/Library/Java/JavaVirtualMachines
10 SUDO_ASKPASS="${dir}/ask-pass" sudo -A "$0" "$@"
16 if ls "$JVM" | grep -q adopt; then
17 echo "Adopt OpenJDK already present"
19 open https://adoptopenjdk.net/
20 osascript -e 'display dialog "Install Java from https://adoptopenjdk.net then click Continue" buttons {"Continue"} default button 1 with title "Install Java"' >/dev/null
24 LIBRARY=/Library/AltusMetrum
25 APPLICATIONS=/Applications
28 echo 'Installing' "$file"
31 mkdir -p "${APPLICATIONS}"
32 if [ -d "${APPLICATIONS}/${file}" ]; then
33 rm -rf "${APPLICATIONS}/${file}"
35 cp -a "$file" "${APPLICATIONS}/${file}"
36 chmod -R +w "${APPLICATIONS}/${file}"
37 xattr -rc "${APPLICATIONS}/${file}"
38 APP=`basename "$file" .app`
39 INSTALLED="${INSTALLED} ${APP}"
43 cp -a "$file" "${LIBRARY}"
47 osascript -e 'display dialog "Installation of'"${INSTALLED}"' complete" with title "Installation Complete" buttons {"OK"} default button 1' >/dev/null