Skip to content

Commit

Permalink
don't use , just search all subdirectories
Browse files Browse the repository at this point in the history
We already skip "obsolete" directories when rsync'ing
  • Loading branch information
RangerRick committed Apr 3, 2023
1 parent b1d4337 commit e447917
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mw5-sync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit e447917

Please sign in to comment.