+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Help with Batch File

  1. #11
    I think I think too much -HP-'s Avatar
    Join Date
    Feb 2009
    Location
    Behind you with a very sharp knife.
    Posts
    2,466

    Default Re: Help with Batch File

    Quote Originally Posted by itsbth View Post
    You can use the command line SVN client...
    This? How do you do that?

  2. #12
    Not a bot itsbth's Avatar
    Join Date
    Feb 2007
    Location
    Norway
    Posts
    1,173

    Default Re: Help with Batch File

    Quote Originally Posted by -HP- View Post
    This? How do you do that?
    That.
    [highlight=batch]@echo off
    echo Updating 21 addons...
    echo Cleaning Adv Duplicator...
    svn cleanup "Adv Duplicator"
    echo Updating Adv Duplicator...
    svn update "Adv Duplicator" --non-interactive
    echo Cleaning GCX...
    svn cleanup "GCX"
    echo Updating GCX...
    svn update "GCX" --non-interactive
    echo Cleaning LifeSupport2...
    svn cleanup "LifeSupport2"
    echo Updating LifeSupport2...
    svn update "LifeSupport2" --non-interactive
    echo Cleaning RD2...
    svn cleanup "RD2"
    echo Updating RD2...
    svn update "RD2" --non-interactive
    echo Cleaning UWSVN...
    svn cleanup "UWSVN"
    echo Updating UWSVN...
    svn update "UWSVN" --non-interactive
    echo Cleaning catdaemon_stargate...
    svn cleanup "catdaemon_stargate"
    echo Updating catdaemon_stargate...
    svn update "catdaemon_stargate" --non-interactive
    echo Cleaning cloakgen...
    svn cleanup "cloakgen"
    echo Updating cloakgen...
    svn update "cloakgen" --non-interactive
    echo Cleaning eg2...
    svn cleanup "eg2"
    echo Updating eg2...
    svn update "eg2" --non-interactive
    echo Cleaning gmdm_resources...
    svn cleanup "gmdm_resources"
    echo Updating gmdm_resources...
    svn update "gmdm_resources" --non-interactive
    echo Cleaning pcmod...
    svn cleanup "pcmod"
    echo Updating pcmod...
    svn update "pcmod" --non-interactive
    echo Cleaning phoenix-storms...
    svn cleanup "phoenix-storms"
    echo Updating phoenix-storms...
    svn update "phoenix-storms" --non-interactive
    echo Cleaning pyroteknix...
    svn cleanup "pyroteknix"
    echo Updating pyroteknix...
    svn update "pyroteknix" --non-interactive
    echo Cleaning rings...
    svn cleanup "rings"
    echo Updating rings...
    svn update "rings" --non-interactive
    echo Cleaning shieldgen...
    svn cleanup "shieldgen"
    echo Updating shieldgen...
    svn update "shieldgen" --non-interactive
    echo Cleaning spacebuildmodelpack...
    svn cleanup "spacebuildmodelpack"
    echo Updating spacebuildmodelpack...
    svn update "spacebuildmodelpack" --non-interactive
    echo Cleaning stargate...
    svn cleanup "stargate"
    echo Updating stargate...
    svn update "stargate" --non-interactive
    echo Cleaning stargate_resources...
    svn cleanup "stargate_resources"
    echo Updating stargate_resources...
    svn update "stargate_resources" --non-interactive
    echo Cleaning weapon_stripper...
    svn cleanup "weapon_stripper"
    echo Updating weapon_stripper...
    svn update "weapon_stripper" --non-interactive
    echo Cleaning wire model pack 1...
    svn cleanup "wire model pack 1"
    echo Updating wire model pack 1...
    svn update "wire model pack 1" --non-interactive
    echo Cleaning wire...
    svn cleanup "wire"
    echo Updating wire...
    svn update "wire" --non-interactive
    echo Cleaning wire2...
    svn cleanup "wire2"
    echo Updating wire2...
    svn update "wire2" --non-interactive
    echo Finished![/highlight]Generated by this PHP script
    [highlight=php]<?php
    // PHP doesn't like explode(...)[1]
    function array_at(Array $ar, $pos){
    return $ar[$pos];
    }

    define('SVN_PARAM', '--non-interactive');

    $all = glob('./*/.svn');

    $bat = sprintf("@echo off\necho Updating %d addons...\n", count($all));

    foreach($all as $folder){
    $bat .= sprintf("echo Cleaning %1\$s...\nsvn cleanup \"%1\$s\"\n", array_at(explode('/', $folder), 1));
    $bat .= sprintf("echo Updating %1\$s...\nsvn update \"%1\$s\" %2\$s\n", array_at(explode('/', $folder), 1), SVN_PARAM);
    }

    $bat .= "echo Finished!";

    echo $bat;

    file_put_contents('update.bat', $bat);
    ?>[/highlight]

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Strange file
    By Teddypimm in forum Off-Topic
    Replies: 6
    Last Post: 06-08-2009, 09:04 AM
  2. Am i missing a file or something?
    By Xenosis in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 03-21-2009, 08:56 PM
  3. Help please! Need to know file contents!
    By BlackholeWM in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 02-20-2009, 05:25 AM
  4. I can't get the file via svn.
    By rauros in forum Installation and Malfunctions Support
    Replies: 7
    Last Post: 10-14-2008, 06:39 PM
  5. Need help with a batch file...
    By -Gamah in forum Off-Topic
    Replies: 8
    Last Post: 07-10-2008, 04:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots