-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_app.sh
More file actions
44 lines (41 loc) · 1.79 KB
/
install_app.sh
File metadata and controls
44 lines (41 loc) · 1.79 KB
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
#!/usr/bin/env sh
if [ "$1" = "compile" ]; then
cmake --build --preset MinSizeRel
elif [ "$1" = "linux" ]; then
if [ "$2" = "-r" ] || [ "$2" = "--remove" ]; then
sudo rm -rf /bin/Anime-Fetch
rm -rf ~/.anime-fetch/;
else
if [ -d "$HOME/.anime-fetch/" ]; then
sudo rm -rf /bin/Anime-Fetch-GUI
sudo rm -rf /bin/Anime-Fetch
rm -rf ~/.local/share/applications/anime-fetch.desktop
rm -rf ~/.anime-fetch/;
fi
cp pkg/anime-fetch-linux.desktop ~/.local/share/applications/anime-fetch.desktop
sudo ln -s "$PWD"/build/MinSizeRel/gui/Anime-Fetch-GUI /bin/Anime-Fetch-GUI
sudo ln -s "$PWD"/build/MinSizeRel/cli/Anime-Fetch /bin/Anime-Fetch
cp -r assets/ ~/.anime-fetch/
fi
elif [ "$1" = "freebsd" ]; then
if [ "$2" = "-r" ] || [ "$2" = "--remove" ]; then
sudo rm -rf /usr/local/sbin/Anime-Fetch
sudo rm -rf /usr/local/sbin/Anime-Fetch-GUI
rm -rf ~/.anime-fetch/;
else
if [ -d "$HOME/.anime-fetch/" ]; then
sudo rm -rf /usr/local/sbin/Anime-Fetch
sudo rm -rf /usr/local/sbin/Anime-Fetch-GUI
rm -rf ~/.anime-fetch/;
fi
cp pkg/anime-fetch-bsd.desktop ~/.local/share/applications/anime-fetch.desktop
sudo ln -s "$PWD"/build/MinSizeRel/cli/Anime-Fetch /usr/local/sbin/Anime-Fetch
sudo ln -s "$PWD"/build//gui/Anime-Fetch-GUI /usr/local/sbin/Anime-Fetch-GUI
cp -r assets/ ~/.anime-fetch/
fi
else
echo "./install_app.sh linux -r : remove linux versiom of the app"
echo "./install_app.sh linux : install the linux versiom of the app"
echo "./install_app.sh freebsd -r : remove FreeBSD versiom of the app"
echo "./install_app.sh freebsd : install the FreeBSD versiom of the app"
fi