X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2Finstall-macosx;h=aebfd5276d58fbab1162b513f38979005c805912;hp=8f0067e5a030190d3fbb25656a8338361a4b57bf;hb=HEAD;hpb=583a749724700845d2d3552a0d3a759f16b25cfe diff --git a/altosui/install-macosx b/altosui/install-macosx index 8f0067e5..721a3d1c 100755 --- a/altosui/install-macosx +++ b/altosui/install-macosx @@ -8,16 +8,23 @@ case `id -u` in ;; *) SUDO_ASKPASS="${dir}/ask-pass" sudo -A "$0" "$@" + case $? in + 0) + ;; + *) + osascript -e 'display dialog "Installation failed. Incorrect password?" buttons {"OK"} default button 1 with title "Installation Status"' > /dev/null + ;; + esac exit 0 ;; esac # Check for java -if ls "$JVM" | grep -q adopt; then - echo "Adopt OpenJDK already present" +if ls "$JVM" | grep -q temurin; then + echo "Adoptium already present" else - open https://adoptopenjdk.net/ - osascript -e 'display dialog "Install Java from https://adoptopenjdk.net then click Continue" buttons {"Continue"} default button 1 with title "Install Java"' >/dev/null + open https://adoptium.net/ + osascript -e 'display dialog "Install Java from https://adoptium.net then click Continue" buttons {"Continue"} default button 1 with title "Install Java"' >/dev/null fi cd "$dir" @@ -44,4 +51,5 @@ for file in *; do ;; esac done +open "${LIBRARY}" osascript -e 'display dialog "Installation of'"${INSTALLED}"' complete" with title "Installation Complete" buttons {"OK"} default button 1' >/dev/null