init.sh: use readlink to get absolute path

* ubuntu may not have realpath installed by default
This commit is contained in:
Zihao Yu
2017-08-23 22:40:35 +08:00
parent ae4e3e7757
commit d53485895c

View File

@ -11,7 +11,7 @@ function init() {
if test $2; then
sed -i -e "/^export $2=.*/d" ~/.bashrc
echo "export $2=`realpath $1`" >> ~/.bashrc
echo "export $2=`readlink -e $1`" >> ~/.bashrc
fi
}