mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Improved detection if signature was missing
@scriptingosx: Wandering if we should just detect if Team IDs match anyway, and continue the installation no matter the gatekeeper setting for allowing App Store apps only.
This commit is contained in:
@@ -426,8 +426,12 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
if [[ $appVerifyStatus -ne 0 ]] ; then
|
if [[ $appVerifyStatus -ne 0 ]] ; then
|
||||||
#if ! teamID=$(spctl -a -vv "$appPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ); then
|
#if ! teamID=$(spctl -a -vv "$appPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ); then
|
||||||
if [[ "$(echo $appVerify | head -1 | grep -oi rejected)" = "rejected" ]]; then
|
if [[ "$(echo $appVerify | head -1 | grep -oi rejected)" = "rejected" ]]; then
|
||||||
|
if [[ "$(echo $appVerify | tail -1)" = "source=no usable signature" ]]; then
|
||||||
|
printlog "Gatekeeper check rejected. No usable signature." ERROR
|
||||||
|
else
|
||||||
printlog "Gatekeeper check rejected. Could be that gatekeeper settings only accept App Store apps." ERROR
|
printlog "Gatekeeper check rejected. Could be that gatekeeper settings only accept App Store apps." ERROR
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
cleanupAndExit 4 "Error verifying $appPath error:\n$logoutput" ERROR
|
cleanupAndExit 4 "Error verifying $appPath error:\n$logoutput" ERROR
|
||||||
fi
|
fi
|
||||||
printlog "Debugging enabled, App Verification output was:\n$logoutput" DEBUG
|
printlog "Debugging enabled, App Verification output was:\n$logoutput" DEBUG
|
||||||
@@ -582,8 +586,12 @@ installFromPKG() {
|
|||||||
if [[ $spctlStatus -ne 0 ]] ; then
|
if [[ $spctlStatus -ne 0 ]] ; then
|
||||||
#if ! spctlout=$(spctl -a -vv -t install "$archiveName" 2>&1 ); then
|
#if ! spctlout=$(spctl -a -vv -t install "$archiveName" 2>&1 ); then
|
||||||
if [[ "$(echo $spctlOut | head -1 | grep -oi rejected)" = "rejected" ]]; then
|
if [[ "$(echo $spctlOut | head -1 | grep -oi rejected)" = "rejected" ]]; then
|
||||||
|
if [[ "$(echo $spctlOut | tail -1)" = "source=no usable signature" ]]; then
|
||||||
|
printlog "Gatekeeper check rejected. No usable signature." ERROR
|
||||||
|
else
|
||||||
printlog "Gatekeeper check rejected. Could be that gatekeeper settings only accept App Store apps." ERROR
|
printlog "Gatekeeper check rejected. Could be that gatekeeper settings only accept App Store apps." ERROR
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
cleanupAndExit 4 "Error verifying $archiveName error:\n$logoutput" ERROR
|
cleanupAndExit 4 "Error verifying $archiveName error:\n$logoutput" ERROR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user