Skip to content

Commit

Permalink
Finds user's home directory with dscl (Issue macadmins#73)
Browse files Browse the repository at this point in the history
Adds compatibility for users that have their home directory in a non-standard location.
  • Loading branch information
canalnoises committed Nov 17, 2020
1 parent 43c2b7e commit b2c26c2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@


loggedInUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')
homeDir=$(/usr/bin/dscl . read /Users/${loggedInUser} NFSHomeDirectory | /usr/bin/awk '{print $2}')


app="/Library/Application Support/SplashBuddy/SplashBuddy.app"
doneFile="/Users/${loggedInUser}/Library/Containers/io.fti.SplashBuddy/Data/Library/.SplashBuddyDone"
doneFile="${homeDir}/Library/Containers/io.fti.SplashBuddy/Data/Library/.SplashBuddyDone"

# Check if:
# - SplashBuddy is not already running
Expand Down

0 comments on commit b2c26c2

Please sign in to comment.