2022-12-18 16:10:09 +01:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
rem ===================
|
|
|
|
rem GLOBAL VARS
|
|
|
|
rem ===================
|
|
|
|
set TOOLS=c:\tools
|
|
|
|
set PERSONALFILES_DONE=%LOCALAPPDATA%\.personalfiles_done
|
2022-12-30 14:53:45 +01:00
|
|
|
set SETTINGS=%TOOLS%\scripts\settings.cmd
|
2022-12-18 16:10:09 +01:00
|
|
|
|
|
|
|
rem already done ?
|
2022-12-30 14:53:45 +01:00
|
|
|
if EXIST %PERSONALFILES_DONE% (
|
|
|
|
echo.
|
|
|
|
echo This was already DONE!
|
|
|
|
echo please remove the file [ %PERSONALFILES_DONE% ] to re-execute this!
|
|
|
|
GOTO END
|
|
|
|
)
|
2022-12-18 16:10:09 +01:00
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
|
2022-12-30 14:53:45 +01:00
|
|
|
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
|
|
|
|
|
2022-12-18 16:30:08 +01:00
|
|
|
echo copying ini file for TOTALCOMMANDER ...
|
2022-12-18 16:10:09 +01:00
|
|
|
if EXIST %TOOLS%\personal\WINCMD.ini (
|
|
|
|
copy /Y %TOOLS%\personal\WINCMD.ini %APPDATA%\GHISLER
|
|
|
|
)
|
|
|
|
|
2022-12-18 16:30:08 +01:00
|
|
|
echo copying TOTALCOMMANDER ftp config file ...
|
2022-12-18 16:10:09 +01:00
|
|
|
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 #######
|
2022-12-30 14:53:45 +01:00
|
|
|
|
|
|
|
:END
|