Skip to content

Commit 37df75a

Browse files
committed
Add Uninstall script
1 parent 0aaca81 commit 37df75a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

uninstall.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#/bin/bash
2+
3+
echo ' LanGong OhZff Zff Uninstall Script.'
4+
echo ' >> Uninstall'
5+
echo ' -> (0/2) Uninstall Exec...'
6+
rm /usr/bin/zff || echo ' -> Warnning: Cannot Uninstall it!'
7+
echo ' -> (1/2) Uninstall All files...'
8+
rm -r /usr/share/ohzff-zff || echo ' -> Warnning: Cannot Uninstall it!'
9+
echo ' -> (2/2) This step have done.'
10+
11+
echo ' >> Check Uninstall'
12+
isdel=0
13+
echo ' -> (0/2) Checking Exec...'
14+
if [ -f "/usr/bin/zff" ]
15+
then
16+
echo ' -> Warnning: /usr/bin/zff has not uninstalled!'
17+
isdel=1
18+
fi
19+
echo ' -> (1/2) Checking All Files...'
20+
if [ -d "/usr/share/ohzff-zff" ]
21+
then
22+
echo ' -> Warnning: /usr/share/ohzff-zff has not uninstalled!'
23+
isdel=1
24+
fi
25+
echo ' -> (2/2) This step have done.'
26+
echo ' >> Check Return value'
27+
echo ' -> (0/1) Checking return value...'
28+
if [ $isdel == 0 ]; then
29+
echo ' -> (1/1) This step have done.'
30+
echo ' >> Uninstalled LanGong OhZff Zff.'
31+
else
32+
echo ' -> Failed: Files are not uninstalled.'
33+
echo ' -> (1/1) This step have done with BAD VALUE.'
34+
echo ' >> Uninstalled failed!'
35+
exit 1
36+
fi

0 commit comments

Comments
 (0)