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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.