Last active
March 2, 2022 15:30
-
-
Save EtienneDuv/a034f7c8f16e44378c3a6a7c890a6d5f to your computer and use it in GitHub Desktop.
env setup for Windows Terminal
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
@echo off | |
docker start mysql>NUL | |
docker start naughty_faraday>NUL | |
docker start redis>NUL | |
GOTO:DEFAULTS | |
rem == DEFAULTS============ | |
call :run chrome, "C:\Program Files\Google\Chrome\Application\" | |
call :run sublime_text, "D:\Programs\Sublime Text 3\" | |
call :run code, "D:\Programs\Microsoft VS Code" | |
call :run dbeaver, "C:\Program Files\DBeaver\" | |
rem call :run Fork, "C:\Users\duverneyeti\AppData\Local\Fork\" | |
rem call :run Postman, "C:\Users\duverneyeti\AppData\Local\Postman\" | |
rem ======================= | |
:DEFAULTS | |
rem GOTO:WORKSHOPAPI | |
rem == Workshop API======= | |
netstat -ano | findstr 6001>NUL | |
if %ERRORLEVEL% equ 1 wt -w 0 --title stor -d D:\Code\storage-core-api-v2 --tabColor #2f3d3d cmd /k "npm run start" | |
netstat -ano | findstr 6005>NUL | |
if %ERRORLEVEL% equ 1 wt -w 0 --title work -d D:\Code\workshop-api --tabColor #03bced cmd /k "npm run nodemon:start" | |
rem ======================= | |
:WORKSHOPAPI | |
rem GOTO:BIADMIN | |
rem == BI admin repo=========== | |
netstat -ano | findstr 8080>NUL | |
if %ERRORLEVEL% equ 1 wt -w 0 --title admin-back -d D:/Code/bi-os-admin/backend --tabColor #20e0c0 cmd /k npm run start `; ^ | |
split-pane --title admin-front -d D:/Code/bi-os-admin/frontend --tabColor #20e0c0 --size 0.3 cmd /k npm run | |
rem ======================= | |
:BIADMIN | |
GOTO :eof | |
:run | |
tasklist /FI "IMAGENAME eq %~1.exe" 2>NUL | find /I /N "%~1.exe">NUL | |
if "%ERRORLEVEL%"=="1" start /d "%~2" %~1.exe>NUL &&^ | |
EXIT /B 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment