mirror of
https://github.com/fleetdm/fleet
synced 2026-05-08 17:50:52 +00:00
for: - https://github.com/fleetdm/fleet/issues/18314 - https://github.com/fleetdm/fleet/issues/18315 - https://github.com/fleetdm/fleet/issues/18317 - https://github.com/fleetdm/fleet/issues/18316 # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Added/updated tests - [x] Manual QA for all new/changed functionality
8 lines
419 B
Bash
8 lines
419 B
Bash
# grab the identifier from the first PackageInfo we find. Those are placed in different locations depending on the installer
|
|
pkg_id=$(tar xOvf "$INSTALLER_PATH" --include='*PackageInfo*' 2>/dev/null | sed -n 's/.*identifier="\([^"]*\)".*/\1/p')
|
|
|
|
# remove all the files and empty directories that were installed
|
|
pkgutil --files $pkg_id | tr '\n' '\0' | xargs -n 1 -0 rm -d
|
|
|
|
# remove the receipt
|
|
pkgutil --forget $pkg_id
|