fix invalid argument for MacOS

This commit is contained in:
Zihao Yu 2023-04-04 15:48:29 +08:00
parent 4b0d7562e7
commit ca1efe654c

View file

@ -3,7 +3,7 @@
# usage: addenv env_name path # usage: addenv env_name path
function addenv() { function addenv() {
sed -i -e "/^export $1=.*/d" ~/.bashrc 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 "By default this script will add environment variables into ~/.bashrc."
echo "After that, please run 'source ~/.bashrc' to let these variables take effect." 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." echo "If you use shell other than bash, please add these environment variables manually."