Created
June 1, 2014 18:04
-
-
Save rtrouton/809fd31aa91501ba0124 to your computer and use it in GitHub Desktop.
Postinstall script for payload-free package which fixes the Users folder being hidden when iTunes 11.2 is installed and Find My Mac is enabled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Detects if /Users is present | |
# If /Users is present, the | |
# chflags command will unhide it | |
if [[ -d "$3/Users" ]]; then | |
chflags nohidden "$3/Users" | |
fi | |
# Detects if /Users/Shared is present | |
# If /Users/Shared is present, the | |
# chflags command will unhide it | |
if [[ -d "$3/Users/Shared" ]]; then | |
chflags nohidden "$3/Users/Shared" | |
fi | |
# Runs a permissions repair to fix | |
# the world-writable permission on | |
# /Users | |
diskutil repairPermissions "$3" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment