forked from Tmpertor/Raven-Storm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_to_bin.sh
40 lines (39 loc) · 1.5 KB
/
install_to_bin.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
#!/bin/bash
echo "[i] We will now install Raven-Storm to your bin path..."
if [ -d "/usr/share/Raven-Storm" ] ; then
echo "[i] Found an old version of Raven-Storm, proceeding to update..."
echo "[i] Backing up old verison."
if [ -d "/usr/share/Raven-Storm/Backup" ] ; then
sudo mv /usr/share/Raven-Storm/Backup ./Backup
else
mkdir ./Backup
fi
name="./Backup/Raven-Storm"
if [ -d $name ] ; then
i=0
while [ -d "$name.bak$i" ] ; do
let i++
done
name="$name.bak$i"
fi
sudo mv /usr/share/Raven-Storm $name
mv ./Backup ./Raven-Storm/
sudo cp -ar ./Raven-Storm /usr/share/
echo "[i] Installation sucessful."
echo "[i] Making Raven-Storm executable..."
sudo mv /usr/share/Raven-Storm/main.py /usr/share/Raven-Storm/rst
sudo chmod +x /usr/share/Raven-Storm/rst
sudo ln -s /usr/share/Raven-Storm/rst /usr/bin/rst || echo "[i] Link already seems to exist."
else
sudo cp -ar ./Raven-Storm /usr/share/
echo "[i] Installation sucessful."
echo "[i] Making Raven-Storm executable..."
sudo mv /usr/share/Raven-Storm/main.py /usr/share/Raven-Storm/rst
sudo chmod +x /usr/share/Raven-Storm/rst
sudo ln -s /usr/share/Raven-Storm/rst /usr/bin/rst || echo "[i] Link already seems to exist."
fi
echo "[i] You can delete the Raven-Storm folder now."
echo "----------------------------------------"
echo "[i] Run 'sudo rst' to start Raven-Storm."
echo "----------------------------------------"
exit 0