lundi 23 juillet 2018

Jamf Helper IF Statement

Is there an if statement that you can use with Jamf Helper?

#!/bin/bash
dialog="Cisco Spark is now Webex Teams! This installation will close and uninstall Spark."
description="$dialog"
button1="Continue"
button2="Cancel"
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"


"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -button2 "$button2"


if "$button1" = selected
then
echo "1"
else
echo "2"
fi

I just want to know if there is I can't find any resources showing me an example of one. Would it be like a normal bash if statement?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire