Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jhbush/ce46da617c36e8ff2a7d to your computer and use it in GitHub Desktop.
Save jhbush/ce46da617c36e8ff2a7d to your computer and use it in GitHub Desktop.
install_microsoft_office_15.12.3.sh
#!/bin/bash
DOWNLOAD_URLS=( \
#Outlook
"http://download.microsoft.com/download/A/2/C/A2C967A4-8B34-48FE-BC3D-E6532CC2DCD0/Microsoft_Outlook_15.12.3_Updater.pkg" \
# Word
"http://download.microsoft.com/download/8/F/0/8F0A32FB-A355-41D1-BBFB-55C734814787/Microsoft_Word_15.12.3_Updater.pkg" \
# Excel
"http://download.microsoft.com/download/8/F/4/8F4AB813-DEFA-4603-9397-D2C73F1EE5BF/Microsoft_Excel_15.12.3_Updater.pkg" \
# Powerpoint
"http://download.microsoft.com/download/3/3/9/33959026-296A-449D-97E3-3FA7944AC373/Microsoft_PowerPoint_15.12.3_Updater.pkg" \
)
PKG_PATHS=( \
"/tmp/Microsoft_Outlook_15.12.3_Updater.pkg" \
"/tmp/Microsoft_Word_15.12.3_Updater.pkg" \
"/tmp/Microsoft_Excel_15.12.3_Updater.pkg" \
"/tmp/Microsoft_PowerPoint_15.12.3_Updater.pkg" \
)
INSTALLER_TARGET="/"
count=0
for download_url in "${DOWNLOAD_URLS[@]}"; do
curl --retry 3 -L "$download_url" -o "${PKG_PATHS[$count]}"
installer -pkg "${PKG_PATHS[$count]}" -target "$INSTALLER_TARGET"
rm "${PKG_PATHS[$count]}"
(( count++ ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment