31 lines
702 B
Batchfile
31 lines
702 B
Batchfile
#@echo off
|
|
echo Uploading folder: %~1
|
|
cd %~1
|
|
|
|
:: Set the folder name as the project name
|
|
for /f %%i in ('cd') DO set pn=%%~nxi
|
|
|
|
:: Extract the file date to set in the comment at least the date
|
|
dir *.c* /OD /N /4 > %temp%\date.txt
|
|
for /f "skip=5 delims=" %%i in (%temp%\date.txt) do set d=%%i & goto :next
|
|
:next
|
|
set "d=%d:~0,10%"
|
|
|
|
echo #%pn% > README.md
|
|
echo[ >> README.md
|
|
echo[ >> README.md
|
|
echo *%d%* >> README.md
|
|
echo[ >> README.md
|
|
echo ToDo: wwtcf? >> README.md
|
|
echo[ >> README.md
|
|
echo[ >> README.md
|
|
echo  >> README.md
|
|
|
|
git init
|
|
git add .
|
|
git commit -m "First commit %d%"
|
|
git remote add origin https://git.infdj.com/C/%pn%.git
|
|
git push -u origin master -f
|
|
|
|
|
|
:end |