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:
parent
df67df476b
commit
2832519a99
@ -23,7 +23,12 @@ function show_help {
|
|||||||
prefix=/usr
|
prefix=/usr
|
||||||
|
|
||||||
user=${SUDO_USER:-${USER}}
|
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)
|
user_home=$(getent passwd ${user} | cut -d: -f6)
|
||||||
|
fi
|
||||||
bashrc_file=${user_home}/.bashrc
|
bashrc_file=${user_home}/.bashrc
|
||||||
|
|
||||||
# Command line parsing
|
# Command line parsing
|
||||||
|
Loading…
Reference in New Issue
Block a user