Skip to content

Commit

Permalink
Backuped installer.bat [developer error]
Browse files Browse the repository at this point in the history
  • Loading branch information
OSINT-TECHNOLOGIES authored Jun 19, 2024
1 parent d4e752b commit ee4b670
Showing 1 changed file with 66 additions and 20 deletions.
86 changes: 66 additions & 20 deletions installer.bat
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

0 comments on commit ee4b670

Please sign in to comment.