Skip to content

Commit

Permalink
feat: add the uninstall.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
WGrape committed Feb 11, 2023
1 parent b7f7874 commit 2e8ed96
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2e8ed96

Please sign in to comment.