@echo off rem =================== rem GLOBAL VARS rem =================== set TOOLS=c:\tools set PERSONALFILES_DONE=%LOCALAPPDATA%\.personalfiles_done set SETTINGS=%TOOLS%\scripts\settings.cmd rem already done ? if EXIST %PERSONALFILES_DONE% ( echo. echo This was already DONE! echo please remove the file [ %PERSONALFILES_DONE% ] to re-execute this! GOTO END ) echo ####### %0 ####### rem =================== rem CONFIGFILE CHECK rem =================== if NOT EXIST %SETTINGS% ( echo. echo WARNING: %SETTINGS% NOT FOUND echo. ) else ( call %SETTINGS% ) echo ++++++++++++++++++ echo USERNAME=%USERNAME% echo USERPROFILE=%USERPROFILE% echo gitserver=%windows_updates% echo gitrepo=%gitrepo% echo ++++++++++++++++++ echo. rem GIT folder anmd REPO ... echo Creating folder %USERPROFILE%\workspace\git ... mkdir %USERPROFILE%\workspace\git 1>nul 2>nul if NOT exist %USERPROFILE%\workspace\git ( echo ERROR: cannot create folder [ %USERPROFILE%\workspace\git ] ! echo ####### %0 ####### exit /b ) echo cloning GIT repository ... cd %USERPROFILE%\workspace\git git clone https://%USERNAME%@%gitserver%/%USERNAME%/%gitrepo%.git echo copying ini file for TOTALCOMMANDER ... if EXIST %TOOLS%\personal\WINCMD.ini ( copy /Y %TOOLS%\personal\WINCMD.ini %APPDATA%\GHISLER ) echo copying TOTALCOMMANDER ftp config file ... if EXIST %TOOLS%\personal\wcx_ftp.ini ( copy /Y %TOOLS%\personal\wcx_ftp.ini %APPDATA%\GHISLER ) rem SSH keys ... if EXIST %TOOLS%\personal ( echo copying personal SSH keys ... copy /Y %TOOLS%\personal\id*.* %USERPROFILE%\.ssh 2>nul ) rem GIT if EXIST %TOOLS%\personal\gitconfig ( echo copying gitconfig ... copy /Y %TOOLS%\personal\gitconfig %USERPROFILE%\.gitconfig ) rem create a statusfile (this codeblock must be executed only once per user) ... echo 1 >%PERSONALFILES_DONE% echo ####### %0 ####### :END