From ca1efe654c61ea91f8cddf9639dbbcc4a8bff20a Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Tue, 4 Apr 2023 15:48:29 +0800 Subject: [PATCH] fix invalid argument for MacOS --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 4cecd43..f7ab9da 100644 --- a/init.sh +++ b/init.sh @@ -3,7 +3,7 @@ # usage: addenv env_name path function addenv() { sed -i -e "/^export $1=.*/d" ~/.bashrc - echo "export $1=`readlink -e $2`" >> ~/.bashrc + echo "export $1=`readlink -f $2`" >> ~/.bashrc echo "By default this script will add environment variables into ~/.bashrc." echo "After that, please run 'source ~/.bashrc' to let these variables take effect." echo "If you use shell other than bash, please add these environment variables manually."