From 2ea431061c736d58adc65f903715c2c920e82258 Mon Sep 17 00:00:00 2001 From: USER Date: Sun, 21 May 2023 18:47:36 +0100 Subject: [PATCH] . --- BaseGitClone.bat | 32 ++++++++++++++++++++++++++++++++ BaseGitPull.bat | 8 +++++--- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100755 BaseGitClone.bat diff --git a/BaseGitClone.bat b/BaseGitClone.bat new file mode 100755 index 0000000..d1086a4 --- /dev/null +++ b/BaseGitClone.bat @@ -0,0 +1,32 @@ +@echo off +set check_computername=%COMPUTERNAME% +echo "Found computer %check_computername%" + +set SCRIPTS="C:\Scripts" +set GIT="C:\Program Files\Git\git-bash.exe" + +mkdir %SCRIPTS% + + +if exist %GIT% ( + %GIT% -c "git config --global --add safe.directory C:/Scripts/wBase" + %GIT% -c "git config --global --add safe.directory C:/Scripts/wLocal" + %GIT% -c "git config --global --add safe.directory C:/Scripts/wPublic" + + echo "Found git." + echo "Attempting clone of wBase" + cd %SCRIPTS% + %GIT% -c "git clone https://mint.nopenso.com/mirror/wBase.git" + + echo "Attempting clone of wLocal" + cd %SCRIPTS% + %GIT% -c "git clone https://mint.nopenso.com/mirror/wLocal.git" + + echo "Attempting clone of wPublic" + cd %SCRIPTS% + %GIT% -c "git clone https://mint.nopenso.com/mirror/wPublic.git" + + del /f/s/q "C:\wPublic\*.*" + rmdir /s/q "C:\wPublic" + + ) diff --git a/BaseGitPull.bat b/BaseGitPull.bat index d624e55..dc8ec77 100755 --- a/BaseGitPull.bat +++ b/BaseGitPull.bat @@ -2,8 +2,6 @@ set check_computername=%COMPUTERNAME% echo "Found computer %check_computername%" -set PACKAGES="C:\Packages" -set WPUBLIC="C:\wPublic" set SCRIPTS="C:\Scripts" set GIT="C:\Program Files\Git\git-bash.exe" @@ -13,7 +11,7 @@ mkdir %SCRIPTS% if exist %GIT% ( %GIT% -c "git config --global --add safe.directory C:/Scripts/wBase" %GIT% -c "git config --global --add safe.directory C:/Scripts/wLocal" - + %GIT% -c "git config --global --add safe.directory C:/Scripts/wPublic" echo "Found git." echo "Attempting pull of wBase" @@ -24,4 +22,8 @@ if exist %GIT% ( cd %SCRIPTS%\wLocal %GIT% -c "git pull" + echo "Attempting pull of wPublic" + cd %SCRIPTS%\wPublic + %GIT% -c "git pull" + )