-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove
executable file
·37 lines (25 loc) · 846 Bytes
/
remove
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# This script removes the files and directories created by the install script
LIB_FILE="/usr/local/lib" # the directory for the library
BIN_FILE="/usr/local/bin" # the directory for the binary
{ # try
echo -n "removing softlink: $BIN_FILE/cd.. ..." &&
sudo rm $BIN_FILE/cd.. &&
echo "Done" &&
echo -n "removing $LIB_FILE/cd../default.txt..." &&
sudo rm $LIB_FILE/cd../default.txt &&
echo "Done" &&
echo -n "removing $LIB_FILE/cd../colorful_print..." &&
sudo rm $LIB_FILE/cd../colorful_print &&
echo "Done" &&
echo -n "removing $LIB_FILE/cd.. ..." &&
sudo rmdir $LIB_FILE/cd.. &&
echo "Done" &&
echo -n "removing .cd.." &&
sudo rm -rf ../.cd.. &&
echo "Done" &&
echo "All files Deleted!"
} || { # catch
echo "Error while removing files"
exit 1
}