PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   ROM/Kitchen Development (http://forum.ppcgeeks.com/forumdisplay.php?f=38)
-   -   platformrebuilder debug script help? (http://forum.ppcgeeks.com/showthread.php?t=95307)

raidzero 11-07-2009 10:25 PM

platformrebuilder debug script help?
 
I am trying to write a script that will determine for me which packagis corrupted, or causing problems in the kitchen. I am not that good at batch I guess because I cannot make this work. It should just copy each package in from a set directory (of suspect packages) and run platformrebuilder with only that package in there. If it works, it just removes that package and moves in the next one in the suspect directory and so on, once it detects an errorlevel from platformrebuilder, it moves the bad package into a different directory and continues until its done. at that point it will just run forever because I have not gotten that far yet...
but it will tell me what I want to know anyway.
Here's the set-up:

Code:

@echo off

if not exist debug_ext_packages md debug_ext_packages
if exist debug_ext echo Claening up after last run.. && rmdir /s /q debug_ext
if not exist debug_ext md debug_ext
if not exist BROKEN_EXT md BROKEN_EXT
pause

set LOG=debug_kitchen.txt
if exist %LOG% del %LOG%

set BUILD=both
set LOCALE=0409
set ROMHDR=ROM\TEST\romhdr.bin
set XIP_PATTERNS=ROM\TEST\XIP\*
set SYS_PATTERNS=SYS\TEST\*
set OEM_PATTERNS=TEST\*
set EXT_PATTERNS=debug_ext\*
set DSM_TEMPLATE=723fb954-d931-4348-b672-82a188e587b5.dsm
set DSM_INCLUDES=*.*


for /F "tokens=*" %%A in ('dir /A:D /s /b debug_ext_packages') do (
    move %%A debug_ext
    echo %%A
    TOOLS\platformrebuilder.exe >NUL
    rmdir /s /q debug_ext\*
    if not "%errorlevel%"=="0" (
        echo Package %%A breaks the kitchen!
        move %%A BROKEN_EXT
          )
   
)

inside SYS\TEST is just 23504 SYS like normal
inside TEST is just my OEM stuff, like oemdrivers, etc
inside ROM\TEST is just 23504 XIP.

can anyone shed some light on why this doesn't work? I know this is not really a PPC question and more of a general windows batch question..

maybe you just cannot refer to a variable like that on the next line? though since it is all in the ('s it should be included??? thanks for all insight! :-D

Mr. X 11-17-2009 11:44 AM

Re: platformrebuilder debug script help?
 
zoom zoom over my head i never was that handy with batch files. but if you get this working i would love to use it.

raidzero 11-17-2009 12:00 PM

Re: platformrebuilder debug script help?
 
Quote:

Originally Posted by Juggalo_X (Post 1336818)
zoom zoom over my head i never was that handy with batch files. but if you get this working i would love to use it.

lol man I got all excited when there was a reply! I know it would be incredibly handy to just go to bed and let your pc cook every package and tell you which ones are bad in the morning


All times are GMT -4. The time now is 10:42 PM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0