From 957cae89fd7cd8080dc18df740425fa4a88760a8 Mon Sep 17 00:00:00 2001 From: Rezart Qelibari Date: Wed, 4 May 2022 18:31:33 +0200 Subject: [PATCH] Install Adobe Acrobat Pro --- modules/04-install-brew-apps.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/04-install-brew-apps.sh b/modules/04-install-brew-apps.sh index cde0b82..3e25b13 100755 --- a/modules/04-install-brew-apps.sh +++ b/modules/04-install-brew-apps.sh @@ -51,9 +51,24 @@ function installParallels() { [ -x "${inittoolPath}" ] && indicateActivity -- 'Running Parallels inittool' ${inittoolPath} init } +function installAdobeAcrobatPro() { + [[ -d '/Applications/Adobe Acrobat DC' ]] && return + indicateActivity -- "Download Adobe Acrobat Pro" ${homebrew_path} fetch --cask adobe-acrobat-pro || return + local dmgPath="$(${homebrew_path} --cache --cask adobe-acrobat-pro)" + local tmpd="$(mktemp -d -t 'adobe-acrobat')" + pushd -q $tmpd + hdiutil attach $dmgPath -nobrowse -readonly -mountpoint $tmpd || return + traps add detach-mount "find '${tmpd}' -type d -mindepth 1 -maxdepth 1 -exec hdiutil detach {} \; >&! /dev/null" + trap "popd -q; traps call exit; rm -fr '${tmpd}'; traps remove detach-mount" EXIT + local pkg="$(find $tmpd -name '*Installer.pkg' | head -n1)" + [[ -n $pkg ]] || return + indicateActivity -- 'Install Adobe Acrobat Pro' installer -package $pkg -target LocalSystem +} + function installCasks() { lop -y body:h1 -- -i 'Installing Homebrew casks' installParallels + installAdobeAcrobatPro installCask rectangle-pro if ! isDebug; then installCask little-snitch @@ -100,6 +115,10 @@ function configure_system() { function getExecPrerequisites() { cmds=( [brew]='' + [find]='' + [head]='' + [installer]='' + [hdiutil]='' ) id -nG | grep admin >&! /dev/null || { lop -- -e 'This module requires the user to be in admin group. Please run again as either root or an admin user.'; return 11 } checkCommands