@echo off call:%~1 goto exit :_create echo "Removing exercice" DEL /S "repo" "work" echo "creating directories" mkdir "-p" "repo" "work" echo "initializing repository" cd "repo" git "init" "--bare" REM UNKNOWN: {"type":"Redirect","op":{"text":">","type":"great"},"file":{"text":"/dev/null","type":"Word"}} cd "%CD%." echo "cloning repository" cd "work" git "clone" "%CD%.\repo" "%CD%" REM UNKNOWN: {"type":"Redirect","op":{"text":">","type":"great"},"file":{"text":"/dev/null","type":"Word"}} REM UNKNOWN: {"type":"Redirect","op":{"text":">&","type":"greatand"},"file":{"text":"1","type":"Word"},"numberIo":{"text":"2","type":"io_number"}} echo "Initializing exercice" IF "%~2" == "debug" ( $1 ) ELSE ( $1 REM UNKNOWN: {"type":"Redirect","op":{"text":">","type":"great"},"file":{"text":"/dev/null","type":"Word"}} REM UNKNOWN: {"type":"Redirect","op":{"text":">&","type":"greatand"},"file":{"text":"1","type":"Word"},"numberIo":{"text":"2","type":"io_number"}} ) cd "%CD%." echo "" echo "Exercice in %undefined%\work\" echo "==========================================" cat "readme.txt" echo "==========================================" echo "" goto:eof :exit exit /b 0