-
Notifications
You must be signed in to change notification settings - Fork 3
/
remove.sh
90 lines (82 loc) · 1.77 KB
/
remove.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
neofetch-exists()
{
if which neofetch >/dev/null
then
echo ""
echo Neofetch is installed.
echo ""
else
echo ""
echo Neofetch is not installed.
echo ""
fi
}
config-backup-exists()
{
if test -f "$HOME/.config/neofetch/config-backup.conf"
then
echo ""
echo "config-backup is installed"
echo ""
echo "restoring backup,,,"
mv $HOME/.config/neofetch/config-backup.conf $HOME/.config/neofetch/config.conf
echo "config backup restored!"
else
echo ""
echo "neofetch config-backup not found"
rm $HOME/.config/neofetch/config.conf
echo "neofetched reverted back to default"
fi
}
logo-backup-exists()
{
if test -f "$HOME/.config/neofetch/logo-backup.png"
then
echo ""
echo "logo-backup is installed"
echo "restoring backup,,,"
mv $HOME/.config/neofetch/logo-backup.png $HOME/.config/neofetch/logo.png
echo "logo backup restored!"
else
echo ""
echo "neofetch logo-backup not found"
rm $HOME/.config/neofetch/logo.png
echo "logo deleted"
fi
}
config-exists()
{
if test -f "$HOME/.config/neofetch/config.conf"
then
echo ""
echo "neofetch config is installed"
echo ""
config-backup-exists
else
echo ""
echo "neofetch config not found,"
echo ""
fi
}
logo-exists()
{
if test -f "$HOME/.config/neofetch/logo.png"
then
echo ""
echo "logo is installed"
echo ""
logo-backup-exists
else
echo ""
echo "logo not found,"
echo "so, nothing to do..."
fi
}
neofetch-exists
config-exists
logo-exists
echo ""
echo "done!"
echo "here's your previous neofetch,"
neofetch