-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
72 lines (60 loc) · 1.79 KB
/
install.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
#!/bin/bash
echo " _____ __ .__ "
echo " / _ \ _/ |_ | | _____ ______"
echo " / /_\ \ \ __\| | \__ \ / ___/"
echo "/ | \ | | | |__ / __ \_ \___ \ "
echo "\____|__ / |__| |____/(____ //____ >"
echo " \/ \/ \/ "
echo ""
echo "Copyright (C) 2024, Debjeet Banerjee"
echo ""
chmod +x uninstall.sh
chmod +x update.sh
if [ -f "/usr/bin/curl" ]; then
echo ""
else
echo "install curl using your package manager after installation"
echo "The update feature will not work if curl is not installed"
fi
sleep 2.5
echo "preparing files for installation"
if [ -d "$HOME/.local/atlas" ];then
cp update.sh $HOME/.local/atlas
cp VERSION $HOME/.local/atlas
else
mkdir $HOME/.local/atlas
cp update.sh $HOME/.local/atlas
cp VERSION $HOME/.local/atlas
fi
sleep .5
make all
echo "creating $HOME/.Atlas"
mkdir $HOME/.Atlas
echo "creating uninstaller at $HOME/.Atlas"
cp uninstall.sh $HOME/.Atlas
echo "creating backup folder at $HOME/.Atlas/backup"
mkdir $HOME/.Atlas/backup
for file in *; do
if [ -f "$file" ]; then
cp $file $HOME/.Atlas/backup
echo "copying $file to $HOME/.Atlas/backup"
sleep .3
elif [ -d "$file" ]; then
cp -r $file $HOME/.Atlas/backup
echo "copying ./$file to $HOME/.Atlas/backup"
else
echo "unexpected error caused while installation!"
exit 1
fi
done
sleep .5
echo "creating symlink for atlas"
sudo ln -s $HOME/.Atlas/backup/atlas /usr/bin/atlas
echo "cleaning up"
make clean
sleep 1.5
echo ""
echo "installation completed"
echo "you can test your installation by running atlas --version"
echo "to uninstall, go to $HOME/.Atlas and run sudo uninstall.sh"
echo "follow me on https://www.github.com/mintRaven-05 for more projects"