#!/bin/sh # variables APPDIR="/Applications/" TMPDIR=$(dirname "$(realpath $INSTALLER_PATH)") # install pkg files CHOICE_XML=$(mktemp /tmp/choice_xml_XXX) cat << EOF > "$CHOICE_XML" attributeSetting 0 choiceAttribute selected choiceIdentifier com.microsoft.package.Microsoft_AutoUpdate.app EOF sudo installer -pkg "$TMPDIR"/MicrosoftEdge-128.0.2739.67.pkg -target / -applyChoiceChangesXML "$CHOICE_XML"