From e447917fc5c88db89c090effcace9dd309d0769f Mon Sep 17 00:00:00 2001 From: Benjamin Reed Date: Mon, 3 Apr 2023 11:44:04 -0400 Subject: [PATCH] don't use , just search all subdirectories We already skip "obsolete" directories when rsync'ing --- mw5-sync.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mw5-sync.ps1 b/mw5-sync.ps1 index 0a0c249..ff7d37f 100644 --- a/mw5-sync.ps1 +++ b/mw5-sync.ps1 @@ -15,8 +15,6 @@ $env:PATH = '{0}{1}{2}' -f $env:PATH,[IO.Path]::PathSeparator,'.' $UNPACK_DIR = Join-Path -Path (Join-Path -Path $MW5_DIR -ChildPath "MW5Mercs") -ChildPath "mods" $DOWNLOAD_PATH = Join-Path -Path (Join-Path -Path $MW5_DIR -ChildPath "MW5Mercs") -ChildPath "mw5modsync-cache" -# $DOWNLOAD_PATH = Join-Path -Path ${env:TEMP} -ChildPath "MW5Mercs_mod_downloads" -$MOD_DIRS = "Rise of Rasalhague", "MW2" if (-not (Test-Path -Path $UNPACK_DIR)) { throw "mod directory ${UNPACK_DIR} does not exist" @@ -198,7 +196,7 @@ Write-Host "### DOWNLOADING NEW FILES ###" -ForegroundColor Cyan $_local_download_path = Get-Cygpath "${DOWNLOAD_PATH}" rsync -avr --partial --progress --no-perms --delete --exclude='*.filepart' --exclude=Depricated --exclude=Deprecated --exclude="Virtual Reality" "ln1.raccoonfink.com::mw5/" "${_local_download_path}/" -foreach ($mod_dir in $MOD_DIRS) { +foreach ($mod_dir in (Get-ChildItem -Recurse -Directory $DOWNLOAD_PATH | Select-Object -ExpandProperty Name)) { $local_filelist = Get-Local-Filelist $mod_dir foreach ($localfile in $local_filelist) {