I'm hitting stride with distributing Mac OS X apps via VPP.
However I'm not finding a build in way of adding an icon to the user dock with this distribution method. I'm already using dockutil.
I'm open to ideas on how to add VPP-distributed app icons to the user docks. I suppose I could wait until an inventory runs and run a dockutil script based on a smart group with the app name criteria. But I'm wanting more instant gratification than waiting for the next inventory to run.
I was thinking a script with an if statement based on the presence of the app name, then run dockutil. But my attempts are not working. Here is my last version of the script:
#!/bin/bash
if [ -f "/Applications/1Password 6.app" ]; then
/usr/local/bin/dockutil --add '/Applications/1Password 6.app'
/bin/sleep 3
killall -KILL Dock
fi
exit 0