From aafea2b6f4d49c541a33119fc5299adea09fb91e Mon Sep 17 00:00:00 2001 From: mTvare <57838468+mTvare6@users.noreply.github.com> Date: Sat, 24 Apr 2021 18:21:13 +0530 Subject: [PATCH] use gnu sed in mac --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2249fc9..a0295e1 100755 --- a/install.sh +++ b/install.sh @@ -53,7 +53,12 @@ cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim read -p "which shell do you use?: " shellname echo "$shellname" -sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua +if [ "$(get_platform)" = "Mac" ]; then + gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua +else + sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings/lua.lua +fi + echo "shell changed to $shellname on nvim successfully!" #for f in `find -E . -regex ".*\.vim$|.*\.lua$"`; do