Skip to content

Commit 20b7a52

Browse files
Updated installer.sh with new variant
1 parent ee4b670 commit 20b7a52

File tree

1 file changed

+11
-42
lines changed

1 file changed

+11
-42
lines changed

installer.sh

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,20 @@
11
#!/bin/bash
22

3-
read -p "Do you want to start the installer? [Y/N]: " UserInput
4-
if [[ "${UserInput^^}" != "Y" ]]; then
5-
exit 0
6-
fi
7-
8-
echo
9-
10-
Menu() {
11-
echo "Select an appropriate menu item:"
12-
echo "[1] Clone repository and install requirements"
13-
echo "[2] Only install requirements"
14-
read -p "Enter the number: " UserChoice
15-
echo
3+
echo "Select appropriate menu item"
4+
echo "[1] Clone repository and install requirements (requires installed Git)"
5+
echo "[2] Only install requirements"
6+
read -p "Enter the number: " UserChoice
167

17-
if [[ "${UserChoice}" == "1" ]]; then
18-
CloneAndInstall
19-
elif [[ "${UserChoice}" == "2" ]]; then
20-
InstallDependencies
21-
else
22-
echo "Incorrect choice."
23-
echo
24-
Menu
25-
fi
26-
}
27-
28-
CloneAndInstall() {
8+
if [ "$UserChoice" == "1" ]; then
299
echo "Cloning repository and installing requirements..."
3010
git clone https://github.com/OSINT-TECHNOLOGIES/dpulse
31-
cd dpulse || exit 1
11+
cd dpulse
3212
pip install -r requirements.txt
33-
34-
echo
35-
}
36-
37-
InstallDependencies() {
13+
elif [ "$UserChoice" == "2" ]; then
3814
echo "Installing requirements..."
3915
pip install -r requirements.txt
16+
else
17+
echo "Incorrect choice."
18+
fi
4019

41-
echo
42-
}
43-
44-
End() {
45-
echo "Installation end."
46-
echo
47-
read -p "Press Enter to continue..."
48-
}
49-
50-
Menu
51-
End
20+
echo "Installation end."

0 commit comments

Comments
 (0)