#Batch boot script for Cheshire Cat Core

1 messages ยท Page 1 of 1 (latest)

bleak geyser
#

I created this .bat file that allows you to start the cat with a single command, in addition, in case of updates, the program will automatically pull and update the cat.
I took the idea from @warped vapor who created the same script but in bash.

@echo off

REM Check if Docker service is running
sc query com.docker.service | find "RUNNING" > nul
IF %ERRORLEVEL% NEQ 0 (
    echo Docker service is not running. Exiting...
    exit /b 0
)

REM Perform Git fetch
git fetch

REM Check if there are updates
git diff --quiet HEAD..origin/main
IF %ERRORLEVEL% EQU 1 (
    echo There are updates available. Apply updates...

    REM If there are updates, run the commands
    docker-compose down
    git pull origin main
    docker-compose build --no-cache

    REM Remove dangling images (optional)
    for /f "tokens=*" %%i in ('docker images -f "dangling=true" -q') do docker rmi -f %%i
) ELSE (
    echo There are no updates.
)

docker-compose up
warped vapor
#

๐Ÿ˜