Batch file to make rsync'ing blead perl under win32 less of a pain in the ass.
Normally when you rsync the sources the permissions and attributes on the rsynced files are all wrong. This script automates resetting them. It also automates the process of applying a patch if you wish.
usage: get_blead TODIR PATCH
If TODIR doesnt exists then an error occurs. PATCH is optional.
WARNING: This batch file is destructive. The directory it rsync's to will be completely replaced by a copy of blead perl. Be careful with what directory you point it at.
@echo off if "%1"=="" goto :errorn setlocal pushd %1 if errorlevel 1 goto :errord cd pause rsync -avz --delete rsync://ftp.linux.activestate.com/perl-current/ . echo y|cacls .\*.* /T /C /P Everyone:F >nul attrib -r /s /d . if "%2"=="" goto :popit perl -pe "BEGIN{binmode STDOUT}; /^[+-]{3}/ && s!/!\\!g;" %2 | patch - +l regen.pl :popit popd goto :end :errord echo Error, directory '%1' was invalid :errorn echo usage: %0 BLEADPERL_DIR :end
In reply to get_blead.cmd by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |