mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 21:02:46 +00:00
Cleaning and adding prevention scripts
This commit is contained in:
20
MDM/install swiftDialog direct condition.sh
Executable file
20
MDM/install swiftDialog direct condition.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Mark: Addigy Condition
|
||||
# Install on success
|
||||
|
||||
gitusername="bartreardon"
|
||||
gitreponame="swiftDialog"
|
||||
appNewVersion=$(curl -sLI "https://github.com/$gitusername/$gitreponame/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g')
|
||||
|
||||
destFile="/Library/Application Support/Dialog/Dialog.app"
|
||||
versionKey="CFBundleShortVersionString" #CFBundleVersion
|
||||
|
||||
currentInstalledVersion="$(defaults read "${destFile}/Contents/Info.plist" $versionKey || true)"
|
||||
if [[ ! -e "${destFile}" || "$currentInstalledVersion" != "$appNewVersion" ]]; then
|
||||
#echo "Let's install…"
|
||||
exit 0
|
||||
else
|
||||
#echo "No need!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user