Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
if (( EUID != 0 )); then
echo "ERROR: This script must be run as root." >&2
exit 1
fi
files=(
/var/MobileAsset/Assets/com_apple_MobileAsset_SoftwareUpdate
/var/MobileAsset/Assets/com_apple_MobileAsset_SoftwareUpdateDocumentation
/var/MobileAsset/AssetsV2/com_apple_MobileAsset_SoftwareUpdate
/var/MobileAsset/AssetsV2/com_apple_MobileAsset_SoftwareUpdateDocumentation
/var/MobileSoftwareUpdate/MobileAsset/AssetsV2
)
for f in "${files[@]}"; do
if [[ ! -d "$f" ]]; then
rm -rf "$f"
mkdir -p "$f"
fi
chmod 755 "$f"
chown root "$f"
chgrp wheel "$f"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment