pkgutil --check-signature "$1" && spctl --assess --verbose --ignore-cache --no-cache --type install "$1"

This commit is contained in:
Reinhard Pointner 2016-11-16 00:14:38 +08:00
parent 40d54f0625
commit 887957ea6f
1 changed files with 13 additions and 1 deletions

View File

@ -4,4 +4,16 @@ PKG_NAME="FileBot_Subtitles_Installer.pkg"
PKG_URL="https://app.filebot.net/files/$PKG_NAME"
PKG="/tmp/$PKG_NAME"
curl -L -o "$PKG" -z "$PKG" --retry 5 "$PKG_URL" && spctl -a -v --type install "$PKG" && sudo installer -verbose -pkg "$PKG" -target LocalSystem
function fetch {
curl --location --output "$1" --time-cond "$1" --retry 5 "$2"
}
function verify {
pkgutil --check-signature "$1" && spctl --assess --verbose --ignore-cache --no-cache --type install "$1"
}
function install {
sudo installer -verbose -package "$1" -target LocalSystem
}
fetch "$PKG" "$PKG_URL" && verify "$PKG" && install "$PKG"