From 2832519a999cc0c847bfd136b3e58e5bbcc4c802 Mon Sep 17 00:00:00 2001 From: Jesse Sanford Date: Tue, 29 Nov 2011 13:37:43 -0500 Subject: [PATCH] added in getent compatible dscl call for macos --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index f070464..d2f8102 100755 --- a/install.sh +++ b/install.sh @@ -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