Advertisement
HitcherUK

Untitled

Mar 28th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.25 KB | None | 0 0
  1. @echo off
  2.  
  3. Echo .svn>exclude.txt
  4. Echo .git>>exclude.txt
  5. Echo %1\media>>exclude.txt
  6. Echo %1\themes>>exclude.txt
  7.  
  8. md BUILD\%1\media\
  9.  
  10. ECHO ----------------------------------------
  11. Echo Building main skin XBT
  12. ECHO ----------------------------------------
  13.  
  14. START /B /WAIT C:\SkinBuilder\TexturePacker -dupecheck -input %1\media -output BUILD\%1\media\Textures.xbt
  15.  
  16. ECHO ----------------------------------------
  17. Echo Finished building main skin XBT
  18. if exist %1\themes (
  19.     Echo Building theme skin XBT Files
  20.     ECHO ----------------------------------------
  21.     for /f "tokens=*" %%f in ('dir /b/ad %1\themes') do START /B /WAIT C:\SkinBuilder\TexturePacker -dupecheck -input %1\themes\%%f -output BUILD\%1\media\%%f.xbt
  22.     Echo Finished Building theme skin XBT Files
  23. )
  24.  
  25. ECHO ----------------------------------------
  26. Echo Copying other files
  27. ECHO ----------------------------------------
  28.  
  29. for /f "tokens=*" %%c in ('dir /b/ad %1') do xcopy "%1\%%c" "BUILD\%1\%%c" /Q /S /I /Y /EXCLUDE:exclude.txt
  30. for /f "tokens=*" %%c in ('dir /b/a-d %1') do copy %1\%%c "BUILD\%1\%%c"
  31.  
  32. del exclude.txt
  33.  
  34. FOR /F "skip=2 Tokens=2 Delims== " %%V IN ('FIND "  version=" "BUILD\%1\addon.xml"') DO SET Version=%%~V
  35.  
  36. ECHO ----------------------------------------
  37. ECHO Current skin version is %Version%
  38. ECHO ----------------------------------------
  39.  
  40. cd BUILD
  41. C:\SkinBuilder\zip -r -q %1-%Version%.zip %1
  42.  
  43. ECHO ----------------------------------------
  44. ECHO Moving files to repository
  45. ECHO ----------------------------------------
  46.  
  47. if exist "F:\xbmc.repo.hitcher\%1\" rmdir "F:\xbmc.repo.hitcher\%1\" /S /Q
  48. md "F:\xbmc.repo.hitcher\%1\"
  49. copy "%1-%Version%.zip" "F:\xbmc.repo.hitcher\%1\"
  50. copy "%1\fanart.jpg" "F:\xbmc.repo.hitcher\%1\fanart.jpg"
  51. copy "%1\icon.png" "F:\xbmc.repo.hitcher\%1\icon.png"
  52. copy "%1\addon.xml" "F:\xbmc.repo.hitcher\%1\addon.xml"
  53. copy "%1\changelog.txt" "F:\xbmc.repo.hitcher\%1\changelog-%Version%.txt"
  54.  
  55. ECHO ----------------------------------------
  56. ECHO Removing BUILD folder
  57. ECHO ----------------------------------------
  58.  
  59. cd ..
  60. rmdir BUILD /S /Q
  61.  
  62. ECHO ----------------------------------------
  63. ECHO Generating addons.xml and addons.xml.md5
  64. ECHO ----------------------------------------
  65.  
  66. F:
  67. cd xbmc.repo.hitcher\
  68. python addons_xml_generator.py
  69.  
  70. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement