summaryrefslogtreecommitdiff
path: root/xmake/scripts/update-script.bat
diff options
context:
space:
mode:
authorcouc <[email protected]>2022-06-07 20:17:59 +0800
committercouc <[email protected]>2022-06-07 20:17:59 +0800
commitda7a45347a82af5096bd0bf54a9713f7a1ee6843 (patch)
tree5023e11987b33fbe000aab47f6744570afed931b /xmake/scripts/update-script.bat
parentad74f3fd1c2c5bf9a95ccad188cf1e412e223235 (diff)
try to be compatible with an older version of Windows.
Diffstat (limited to 'xmake/scripts/update-script.bat')
-rw-r--r--xmake/scripts/update-script.bat11
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/scripts/update-script.bat b/xmake/scripts/update-script.bat
index 43084ffda..91c5b8f3c 100644
--- a/xmake/scripts/update-script.bat
+++ b/xmake/scripts/update-script.bat
@@ -4,4 +4,13 @@ echo Removing old files
cd /d "%~1"
del actions core includes languages modules platforms plugins repository rules scripts templates themes /S /Q /F >nul
echo Copying from temp directory to "%~1"
-robocopy "%~2" "%~1" /S /IS /NFL /NDL /NJH /NJS >nul
+
+if exist "%WINDIR%\System32\Robocopy.exe" (
+ robocopy "%~2" "%~1" /S /IS /NFL /NDL /NJH /NJS >nul
+) else (
+ if exist "%WINDIR%\SysWOW64\Robocopy.exe" (
+ robocopy "%~2" "%~1" /S /IS /NFL /NDL /NJH /NJS >nul
+ ) else (
+ xcopy "%~2" "%~1" /S /Y /Q >nul
+ )
+)