Skip to content

Instantly share code, notes, and snippets.

@gjpalau
Created August 21, 2015 20:35
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 gjpalau/9d0e01746a78cee5ebb3 to your computer and use it in GitHub Desktop.
Save gjpalau/9d0e01746a78cee5ebb3 to your computer and use it in GitHub Desktop.
Install Office 2016 Script
#!/bin/bash
DOWNLOAD_URLS=( \
#Outlook
"http://download.microsoft.com/download/A/A/8/AA80584D-0B2B-4C72-8AA4-E9F51579D1BD/Microsoft_Outlook_15.13.1_Updater.pkg" \
# Word
"http://download.microsoft.com/download/4/A/A/4AADD7A3-8CBB-46BA-84DF-633C86FA4496/Microsoft_Word_15.13.1_Updater.pkg" \
# Excel
"http://download.microsoft.com/download/B/4/7/B4706EF5-0038-41F1-94E3-6ECA47575815/Microsoft_Excel_15.13.1_Updater.pkg" \
# Powerpoint
"http://download.microsoft.com/download/3/7/5/375BD444-21F2-4017-9988-2AF94A8B325F/Microsoft_PowerPoint_15.13.1_Updater.pkg" \
)
PKG_PATHS=( \
"/tmp/Microsoft_Outlook_15.13.1_Updater.pkg" \
"/tmp/Microsoft_Word_15.13.1_Updater.pkg" \
"/tmp/Microsoft_Excel_15.13.1_Updater.pkg" \
"/tmp/Microsoft_PowerPoint_15.13.1_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