Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Last active July 26, 2021 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtrouton/2383a92814cbb01f9625981dfbcb681a to your computer and use it in GitHub Desktop.
Save rtrouton/2383a92814cbb01f9625981dfbcb681a to your computer and use it in GitHub Desktop.
#!/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