Last active
July 26, 2021 14:28
-
-
Save rtrouton/2383a92814cbb01f9625981dfbcb681a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
install_dir=$(/usr/bin/dirname $0) | |
sap_gui_installer="$install_dir/SAP GUI for Java Installer.app" | |
sap_gui_install_path="/Applications/SAP Clients" | |
ERROR=0 | |
if [[ -x "$sap_gui_installer" ]]; then | |
echo "Attempting to install $sap_gui_install..." | |
"$sap_gui_installer/Contents/MacOS/install" -G --installdir "${sap_gui_install_path}" -J "${install_dir}" --force | |
if [[ $? -ne 0 ]]; then | |
echo "ERROR! Installation of $sap_gui_installer failed" | |
ERROR=1 | |
else | |
echo "Successfully installed $sap_gui_installer" | |
fi | |
else | |
echo "$sap_gui_installer not found or not executable." | |
ERROR=1 | |
fi | |
exit $ERROR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment