Skip to content

Commit

Permalink
Add Improve uninstall and install script
Browse files Browse the repository at this point in the history
Add Improve uninstall and install script

Signed-off-by: Bensuperpc <[email protected]>
  • Loading branch information
bensuperpc committed May 29, 2021
1 parent 0888763 commit 4ec621e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ echo "copy..."
sudo mkdir -p /usr/bin/ben_script && sudo cp -a . /usr/bin/ben_script
echo "copy done"

echo "Install ben's scripts..."
echo "create symlink..."
find /usr/bin/ben_script -type f -name "*.sh" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" -exec sudo ln -s {} /usr/bin \;
find /usr/bin/ben_script -type f -name "*.sh" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" ! -path "*/git-scripts/*" ! -path "*/git-extras/*" -exec sudo ln -s {} /usr/bin \;
echo "create symlink done"
echo "Install ben's scripts done"

Expand All @@ -65,4 +66,9 @@ cd /usr/bin/ben_script/git-extras
sudo ./install.sh
echo "Install git-extras done"

echo "Install git-scripts..."
find /usr/bin/ben_script/git-scripts -type f -name "git-*" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
echo "Install git-scripts done"


echo "Install done"
4 changes: 2 additions & 2 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ cd /usr/bin/ben_script/git-extras
sudo make uninstall
echo "Removing git-extras done"

echo "Removing ben's scripts..."
echo "Removing ben's scripts and git-scripts..."
echo "Remove symlink..."
sudo find /usr/bin -lname '/usr/bin/ben_script/*' -delete
echo "Remove symlink done"

sudo rm -fr /usr/bin/ben_script

echo "Removing ben's scripts done"
echo "Removing ben's scripts and git-scripts done"
#sudo rm -fr /usr/bin/ben_script && sudo find /usr/bin/ -xtype l -delete
echo "Removing done"

0 comments on commit 4ec621e

Please sign in to comment.