Skip to content

Commit

Permalink
Modified the automated scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Coder-Harshit committed Sep 13, 2024
1 parent 30d2800 commit 28683ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
15 changes: 7 additions & 8 deletions install_ospect.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ if /I not "%confirmation%" == "y" (
goto :EOF
)

:: Check for Rust and Cargo
if not exist "%USERPROFILE%\.cargo\bin\rustc.exe" (
echo Rust is not installed. Installing Rust...
curl -sSf https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -o rustup-init.exe
rustup-init.exe -y
del rustup-init.exe
)

:: Download OSpect pre-built binary (if available) or build from source
echo Checking for pre-built OSpect binary...
curl --head --silent --fail https://raw.githubusercontent.com/Coder-Harshit/OSpect/main/releases/ospect.exe >nul
Expand All @@ -32,6 +24,13 @@ if %errorlevel% == 0 (
curl -O https://raw.githubusercontent.com/Coder-Harshit/OSpect/main/sample_config.toml
) else (
echo Pre-built binary not found. Building OSpect from source...
:: Check for Rust and Cargo
if not exist "%USERPROFILE%\.cargo\bin\rustc.exe" (
echo Rust is not installed. Installing Rust...
curl -sSf https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -o rustup-init.exe
rustup-init.exe -y
del rustup-init.exe
)
:: Assuming your OSpect source code is in the current directory
git clone https://github.com/Coder-Harshit/OSpect.git
cd OSpect
Expand Down
10 changes: 5 additions & 5 deletions install_ospect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ if [[ ! "$confirmation" =~ ^[Yy]$ ]]; then
exit 1
fi

# Check for Rust and Cargo
if ! command -v rustc &> /dev/null; then
echo "Rust is not installed. Installing Rust..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi

# Download OSpect pre-built binary (if available) or build from source
if curl --output /dev/null --silent --head --fail "https://raw.githubusercontent.com/Coder-Harshit/OSpect/main/releases/ospect"; then
Expand All @@ -29,6 +24,11 @@ if curl --output /dev/null --silent --head --fail "https://raw.githubusercontent
curl -O https://raw.githubusercontent.com/Coder-Harshit/OSpect/main/sample_config.toml
else
echo "Pre-built binary not found. Building OSpect from source..."
# Check for Rust and Cargo
if ! command -v rustc &> /dev/null; then
echo "Rust is not installed. Installing Rust..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
# Assuming your OSpect source code is in the current directory
git clone https://github.com/Coder-Harshit/OSpect.git
cd OSpect
Expand Down

0 comments on commit 28683ff

Please sign in to comment.