Post Reply

[TOOL 4 CHEFS] kitchen UPDATE ONLY NEW EXT batch file (EVK & OSK compatible)

OP HD2Owner

25th July 2010, 01:46 AM   |  #1  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,152
 
2,141 posts
Join Date:Joined: Oct 2009
Donate to Me
only new ext-pkg's to a other kitchen (language import support is coming...).

a friend of mine wrote a little bat-file for me and i want to share it with you.
the creator insisted to call it bloody rudimentary but i think it's quite useful.
he wants to stay anonymous... :)

around two hours of brainwork (i remember the command for this... what was it again?) and notepad.exe to create this from scratch.

you only need to adjust the two paths at the beginning.
the batch searches for same packets (exact name matches) and ignores them.
a txt will pop up showing only the new packages.
you can edit this list (only delete pks but don't change entries).
save and close after you removed the lines you don't want to import.
batch will create a temp workfolder in c: (it will pop up once copying is finished).
at this point you can rename the folders (add *_photon_1.36 at the end for example)
and add missing language sub-folders.
if you are done, press any key at the cmd window and all the edited/renamed package folders will be moved to the ext-folder in the destination kitchen (_NewPackages folder).

example (if you want to update only new ext from 1.36 into 1.11 kitchen):
-kitchen1 (source kitchen) photon 1.36 htc
-kitchen2 (destination kitchen) photon 1.11 vodafone

tested and working with oskitchen1.31beta10 file-/folder-structure.

take this code and save it into a txt file. rename it to *.bat and adjust the paths.

Code:
@echo off
REM ------- EDITABLE SECTION

SET L_SOURCEPATH="X:\osKitchen Zero v1.31beta10_1.36SOURCE\Sources\Devices\HTC HD Mini\EXT Packages\HTC HD Mini Packages\"
SET L_TARGETPATH="X:\osKitchen Zero v1.31beta10_1.11DESTINATION\Sources\Devices\HTC HD Mini\EXT Packages\HTC HD Mini Packages\"

REM ------ END

SET L_WORKPATH=C:\SCRWORK
MKDIR %L_WORKPATH%
SET SCRFILE=%L_WORKPATH%\packets_source.txt
SET TGTFILE=%L_WORKPATH%\packets_target.txt
SET ACTFILE=%L_WORKPATH%\PKG2COPY.TXT
del %ACTFILE%>nul
CD %L_SOURCEPATH%
DIR /B>%SCRFILE%
CD \
CD %L_TARGETPATH%
DIR /B>%TGTFILE%
CD \
  FOR /F "delims=" %%I IN (%SCRFILE%)  DO (
  REM <--------------------------------------------------------------
  REM insert logic here to select packages i.e. package numbers
  FINDSTR /C:"%%I" %TGTFILE%>nul&& ECHO Exact name match. || ECHO "%%I">>%ACTFILE%
REM insert some better logic here duh!
  REM <--------------------------------------------------------------
  )
CLS
ECHO !!!! Remove packages you dont want to copy from list but RETAIN LINE FORMAT !!!!
ECHO !!!! Save and close List to continue!!!!
  start /w notepad %L_WORKPATH%\PKG2COPY.TXT
REM hier: Collect packages based on pkg2copy.txt
  CD %L_SOURCEPATH%
  FOR /F "delims=" %%I IN (%ACTFILE%)  DO (
  xcopy /E /Y /H /I %%I %L_WORKPATH%\PRECOPY\%%I
  )
CLS
ECHO !!!!Edit Folders now!!! Add langs etc.. press any key to continue and copy edited folders to destination (_NewPackages)
  REM <--------------------------------------------------------------
  REM i.E. delete... rename....
  explorer %L_WORKPATH%\PRECOPY\
  REM automate it duh!
  pause
  REM <--------------------------------------------------------------

REM !!!  ACTION - Copy from Precopy to Target Folder (Targetpath\_NewPackages)
 xcopy /E /H /Y /I %L_WORKPATH%\PRECOPY\*.* %L_TARGETPATH%\_NewPackages\
 rmdir /s /q %L_WORKPATH%
 explorer %L_TARGETPATH%
 CD \
Last edited by HD2Owner; 5th October 2010 at 04:32 PM.
26th July 2010, 04:32 PM   |  #2  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,152
 
2,141 posts
Join Date:Joined: Oct 2009
Donate to Me
tested now with ervius visual kichen.

works. hope y'all enjoy this batch file...

please leave a "thanks" if you like and use it.

thanks
26th July 2010, 07:09 PM   |  #3  
Retired Forum Moderator / Recognized Developer
Flag Dar-es-Salaam
Thanks Meter: 77
 
847 posts
Join Date:Joined: Jan 2009
Donate to Me
More
wow this tool is awesome, its amazing how a simple batch file created by notepad can do so much functionality..
gonna use this right now
thanks..
27th July 2010, 07:38 PM   |  #4  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,152
 
2,141 posts
Join Date:Joined: Oct 2009
Donate to Me
my opinion:

many xda-chef's would use it if they would know about it's existence..

please help me to keep this thread alive so all chefs can see it better...

tell your favorite chefs to take a look at this thread. thanks.
Last edited by HD2Owner; 27th July 2010 at 07:43 PM.
27th July 2010, 08:04 PM   |  #5  
Senior Member
Flag Cape Town
Thanks Meter: 52
 
847 posts
Join Date:Joined: Feb 2010
Donate to Me
Wow, the time this is going to save me! (^^,) I haven't used it yet but I'm pretty sure I will. Thanks bro!
28th July 2010, 02:06 PM   |  #6  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,152
 
2,141 posts
Join Date:Joined: Oct 2009
Donate to Me
enjoy......
28th July 2010, 10:27 PM   |  #7  
af974's Avatar
Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,887
 
4,940 posts
Join Date:Joined: Jan 2008
More
I didnt try it yet but sounds like a very life saver tool, got one week sticky for let other chefs to check it.

Thanks for sharing.

@ mods: i will take care of unsticky it @ 04 August.
Last edited by af974; 28th July 2010 at 10:32 PM.
28th July 2010, 10:46 PM   |  #8  
Laurentius26's Avatar
Recognized Developer
Thanks Meter: 1,151
 
1010
7,948 posts
Join Date:Joined: Nov 2005
Donate to Me
I'm sorry but I've read the intro 3 times and still don't know what it does.
28th July 2010, 10:54 PM   |  #9  
af974's Avatar
Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,887
 
4,940 posts
Join Date:Joined: Jan 2008
More
As i said ,i didnt try it yet but for what i understood it updates packages in your EXT folder,example:

You have a 2.14 Leo Kitchen and you want update only NEW EXT packages from 3.04.

Quote:
Originally Posted by Laurentius26

I'm sorry but I've read the intro 3 times and still don't know what it does.

29th July 2010, 01:00 PM   |  #10  
HD2Owner's Avatar
OP Recognized Developer
Flag Neuhausen am Rheinfall
Thanks Meter: 2,152
 
2,141 posts
Join Date:Joined: Oct 2009
Donate to Me
feel free to test it. no harm done.

source and destination folders stay untouched.

only the (not exact name match - packets that aren't already in the destination kitchen) packets you don't delete from the pop-up list will be copied to the destination kitchen ext folder (_NewPackages subfolder).

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes