-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backuped installer.bat [developer error]
- Loading branch information
1 parent
d4e752b
commit ee4b670
Showing
1 changed file
with
66 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,66 @@ | ||
#!/bin/bash | ||
|
||
echo "Select appropriate menu item" | ||
echo "[1] Clone repository and install requirements (requires installed Git)" | ||
echo "[2] Only install requirements" | ||
read -p "Enter the number: " UserChoice | ||
|
||
if [ "$UserChoice" == "1" ]; then | ||
echo "Cloning repository and installing requirements..." | ||
git clone https://github.com/OSINT-TECHNOLOGIES/dpulse | ||
cd dpulse | ||
pip install -r requirements.txt | ||
elif [ "$UserChoice" == "2" ]; then | ||
echo "Installing requirements..." | ||
pip install -r requirements.txt | ||
else | ||
echo "Incorrect choice." | ||
fi | ||
|
||
echo "Installation end." | ||
@echo off | ||
set /p UserInput=Do you want to start installer? [Y/N]: | ||
if /I "%UserInput%" neq "Y" goto End | ||
|
||
echo. | ||
|
||
:CheckGit | ||
where git >nul 2>&1 | ||
if %errorlevel% neq 0 ( | ||
echo Git is not installed. Please install Git first. | ||
set GIT_NOT_INSTALLED=1 | ||
) else ( | ||
set GIT_NOT_INSTALLED=0 | ||
) | ||
|
||
echo. | ||
|
||
:Menu | ||
echo Select appropriate menu item | ||
echo. | ||
echo [1] Clone repository and install requirements (requires installed Git) | ||
echo [2] Only install requirements | ||
echo. | ||
set /p UserChoice=Enter the number: | ||
|
||
echo. | ||
|
||
if "%UserChoice%"=="1" ( | ||
if %GIT_NOT_INSTALLED%==1 ( | ||
echo You cannot clone the repository because Git is not installed. | ||
echo. | ||
goto Menu | ||
) | ||
call :CloneAndInstall | ||
) else if "%UserChoice%"=="2" ( | ||
call :InstallDependencies | ||
) else ( | ||
echo Incorrect choice. | ||
echo. | ||
goto Menu | ||
) | ||
|
||
goto End | ||
|
||
:CloneAndInstall | ||
echo Cloning repository and installing requirements... | ||
git clone https://github.com/OSINT-TECHNOLOGIES/dpulse | ||
cd dpulse | ||
pip install -r requirements.txt | ||
|
||
echo. | ||
|
||
goto End | ||
|
||
:InstallDependencies | ||
echo Installing requirements... | ||
pip install -r requirements.txt | ||
|
||
echo. | ||
|
||
goto End | ||
|
||
:End | ||
echo Installation end. | ||
echo. | ||
pause |