update flag which stops installation if app is not present #532

Closed
opened 2026-01-19 18:34:24 +00:00 by michael · 4 comments
Owner

Originally created by @scriptingosx on GitHub.

We have gotten a few requests on MacAdmins Slack recently for an 'update-only' mode in Installomator. That is, when the app or tool in question is not present on the system, Installomator does nothing. If the app is present, Installomator proceeds to determine if an update exists etc. This issue is to track comments and discussion around it.

The challenge here is to determine if the app is present. This is fairly trivial for apps in dmg and other archives, since we determine the installed app to retrieve the version. However, with pkgs, this can turn out to be much harder. Since pkgs may not install a proper app bundle or install it in an arbitrary, non-standard location. Currently, we determine the installed version of a pkg from the pkg receipt. That means that if an app or tool was installed, but later removed by deleting the app, but not "forgetting" the receipt, Installomator will see that app or tool as installed, even though it was deleted.

All of that said, I believe it would make sense to use the INSTALL variable for this with a new, third option update.

Originally created by @scriptingosx on GitHub. We have gotten a few requests on MacAdmins Slack recently for an 'update-only' mode in Installomator. That is, when the app or tool in question is _not_ present on the system, Installomator does _nothing_. If the app is present, Installomator proceeds to determine if an update exists etc. This issue is to track comments and discussion around it. The challenge here is to determine if the app is present. This is fairly trivial for apps in dmg and other archives, since we determine the installed app to retrieve the version. However, with pkgs, this can turn out to be much harder. Since pkgs may not install a proper app bundle or install it in an arbitrary, non-standard location. Currently, we determine the installed version of a pkg from the pkg receipt. That means that if an app or tool was installed, but later removed by deleting the app, but not "forgetting" the receipt, Installomator will see that app or tool as installed, even though it was deleted. All of that said, I believe it would make sense to use the `INSTALL` variable for this with a new, third option `update`.
michael added the feature label 2026-01-19 18:34:24 +00:00
Author
Owner

@scriptingosx commented on GitHub:

Alternative: You could create a wrapper script that checks for an app's presence and runs Installomator selectively, e.g.:

if [[ -d "/Applications/Firefox.app" ]]; then
    /usr/local/Installomator/Installomator.sh firefoxpkg
fi

if [[ -d "/Applications/Google Chrome.app" ]]; then
    /usr/local/Installomator/Installomator.sh googlechromepkg
fi

# repeat for each app or tool
@scriptingosx commented on GitHub: Alternative: You could create a wrapper script that checks for an app's presence and runs Installomator selectively, e.g.: ``` if [[ -d "/Applications/Firefox.app" ]]; then /usr/local/Installomator/Installomator.sh firefoxpkg fi if [[ -d "/Applications/Google Chrome.app" ]]; then /usr/local/Installomator/Installomator.sh googlechromepkg fi # repeat for each app or tool ```
Author
Owner

@scriptingosx commented on GitHub:

Other alternative: @Mac-Nerd 's Patchomator

@scriptingosx commented on GitHub: Other alternative: @Mac-Nerd 's [Patchomator](https://github.com/Mac-Nerd/patchomator)
Author
Owner

@scriptingosx commented on GitHub:

discussion is happening in #410 in case you want to chime in

@scriptingosx commented on GitHub: discussion is happening in #410 in case you want to chime in
Author
Owner

@Theile commented on GitHub:

Or #410.

@Theile commented on GitHub: Or #410.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Installomator/Installomator#532