From 2e8ed969accf5ccd4c8038cd262b4b2a6a768cce Mon Sep 17 00:00:00 2001 From: lvsi <15239928381@163.com> Date: Sat, 11 Feb 2023 23:56:21 +0800 Subject: [PATCH] feat: add the uninstall.sh --- uninstall.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..6236237 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Go back to the root directory of ngxway. +ngxwayPath=$(cd `dirname $0`; pwd) +cd $ngxwayPath + +# Require the common shell scripts. +. $ngxwayPath/scripts/common.sh + +# Check the system, only available for Linux and Unix series. +whichSystem=$(printWhichSystem) + +# Export to the global PATH. +if [ $whichSystem == "Linux" ];then + sed "/${exportPathTemplate1}/,+2d" ~/.bashrc + source ~/.bashrc +else + sed -i "" "/${exportPathTemplate1}/,+2d" ~/.bash_profile + source ~/.bash_profile +fi