mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-18 05:10:59 +00:00
updated TeamID parsing
This commit is contained in:
@@ -184,7 +184,7 @@ case $identifier in
|
|||||||
downloadURL="https://downloads.malwarebytes.com/file/mb3-mac"
|
downloadURL="https://downloads.malwarebytes.com/file/mb3-mac"
|
||||||
expectedTeamID="GVZRY6KDKR"
|
expectedTeamID="GVZRY6KDKR"
|
||||||
;;
|
;;
|
||||||
suspiciouspackage)
|
suspiciouspackage) # thanks Mischa van der Bent
|
||||||
name="Suspicious Package"
|
name="Suspicious Package"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
downloadURL="https://mothersruin.com/software/downloads/SuspiciousPackage.dmg"
|
downloadURL="https://mothersruin.com/software/downloads/SuspiciousPackage.dmg"
|
||||||
@@ -403,14 +403,14 @@ installFromDMG() {
|
|||||||
|
|
||||||
# verify with spctl
|
# verify with spctl
|
||||||
echo "Verifying: $dmgmount/$appName"
|
echo "Verifying: $dmgmount/$appName"
|
||||||
if ! teamID=$(spctl -a -vv "$dmgmount/$appName" 2>&1 | awk '/origin=/ {print $NF }' ); then
|
if ! teamID=$(spctl -a -vv "$dmgmount/$appName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ); then
|
||||||
echo "Error verifying $dmgmount/$appName"
|
echo "Error verifying $dmgmount/$appName"
|
||||||
cleanupAndExit 4
|
cleanupAndExit 4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Team ID: $teamID (expected: $expectedTeamID )"
|
echo "Team ID: $teamID (expected: $expectedTeamID )"
|
||||||
|
|
||||||
if [ "($expectedTeamID)" != "$teamID" ]; then
|
if [ "$expectedTeamID" != "$teamID" ]; then
|
||||||
echo "Team IDs do not match!"
|
echo "Team IDs do not match!"
|
||||||
cleanupAndExit 5
|
cleanupAndExit 5
|
||||||
fi
|
fi
|
||||||
@@ -453,14 +453,14 @@ installFromDMG() {
|
|||||||
installFromPKG() {
|
installFromPKG() {
|
||||||
# verify with spctl
|
# verify with spctl
|
||||||
echo "Verifying: $archiveName"
|
echo "Verifying: $archiveName"
|
||||||
if ! teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' ); then
|
if ! teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ); then
|
||||||
echo "Error verifying $archiveName"
|
echo "Error verifying $archiveName"
|
||||||
cleanupAndExit 4
|
cleanupAndExit 4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Team ID: $teamID (expected: $expectedTeamID )"
|
echo "Team ID: $teamID (expected: $expectedTeamID )"
|
||||||
|
|
||||||
if [ "($expectedTeamID)" != "$teamID" ]; then
|
if [ "$expectedTeamID" != "$teamID" ]; then
|
||||||
echo "Team IDs do not match!"
|
echo "Team IDs do not match!"
|
||||||
cleanupAndExit 5
|
cleanupAndExit 5
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user