From d53485895c5fe21c9b5aafd31bf06f7f7ba681ff Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Wed, 23 Aug 2017 22:40:35 +0800 Subject: [PATCH] init.sh: use readlink to get absolute path * ubuntu may not have realpath installed by default --- init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 1ca0739..1865a62 100644 --- a/init.sh +++ b/init.sh @@ -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 }