47 lines
1.1 KiB
Batchfile
47 lines
1.1 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
REM Define the AllSpice directory
|
|
set "ALLSPICE_DIR=%USERPROFILE%\allspice"
|
|
|
|
REM Check if the directory exists, if not, create it
|
|
if not exist "!ALLSPICE_DIR!" mkdir "!ALLSPICE_DIR!"
|
|
|
|
REM Copy this script to the AllSpice directory
|
|
set "SCRIPT_NAME=%~nx0"
|
|
set "SCRIPT_PATH=!ALLSPICE_DIR!\!SCRIPT_NAME!"
|
|
copy /Y "%~f0" "!SCRIPT_PATH!" >nul 2>&1
|
|
|
|
REM Change to the AllSpice directory
|
|
cd /d "!ALLSPICE_DIR!"
|
|
|
|
@echo off
|
|
:: clone-allspice-and-svn.bat
|
|
:: Downloads a bash script and runs it
|
|
:: svn-to-allspice.sh - clones AllSpice, clones SVN into AllSpice repo. Sets up hooks and quality of life scripts.
|
|
|
|
|
|
setlocal
|
|
|
|
:: Define the URL and output file
|
|
set URL=https://hub.allspice.io/AllSpice-Demos/AllSpice-Loves-SVN/raw/branch/main/.allspice/svn-to-allspice.sh
|
|
set OUTPUT=svn-to-allspice.sh
|
|
|
|
:: Download the file using curl
|
|
curl -L -o %OUTPUT% %URL%
|
|
|
|
:: Check if download was successful
|
|
if %errorlevel% neq 0 (
|
|
echo Download failed!
|
|
exit /b 1
|
|
)
|
|
|
|
echo Download successful: %OUTPUT%
|
|
|
|
endlocal
|
|
|
|
|
|
|
|
:: Run the repo clone/install script
|
|
"C:\Program Files\Git\bin\bash.exe" -c "$USERPROFILE/allspice/svn-to-allspice.sh"
|
|
pause |