1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

added in getent compatible dscl call for macos

This commit is contained in:
Jesse Sanford 2011-11-29 13:37:43 -05:00
parent df67df476b
commit 2832519a99

View File

@ -23,7 +23,12 @@ function show_help {
prefix=/usr
user=${SUDO_USER:-${USER}}
OS=`uname`
if [ $OS == 'Darwin' ]; then
user_home=$(dscl . -search /Users UniqueID ${user} | cut -d: -f6)
else
user_home=$(getent passwd ${user} | cut -d: -f6)
fi
bashrc_file=${user_home}/.bashrc
# Command line parsing