Diff for /foxfm/make.bat between versions 1.1 and 1.2

version 1.1, 2009/11/30 21:41:20 version 1.2, 2010/05/24 12:08:24
Line 2 Line 2
 REM This script checks out the sources of the defined TAG and creates a   REM This script checks out the sources of the defined TAG and creates a 
 REM firefox .xpi file. The scripts expects the tools 'cvs' and '7za' in   REM firefox .xpi file. The scripts expects the tools 'cvs' and '7za' in 
 REM TOOLDIR folder.  REM TOOLDIR folder.
   
 REM Remember current directory  REM Remember current directory
 set CURRDIR=%cd%  set CURRDIR=%cd%
   REM Remember current directory
   set BUILDDIR=build
 REM Folder containing the required tools  REM Folder containing the required tools
 set TOOLDIR=tools  set TOOLDIR=tools
 REM Add path of 'tools' directory  REM Add path of 'tools' directory
Line 11  set PATH=%PATH%;%CURRDIR%\%TOOLDIR% Line 14  set PATH=%PATH%;%CURRDIR%\%TOOLDIR%
 REM Name of the CVS module  REM Name of the CVS module
 set MODULE=foxfm  set MODULE=foxfm
 REM CVS TAG used to checkout  REM CVS TAG used to checkout
set TAG=foxfm_0-0-1set TAG=foxfm_0-4-0
 set USERTAG=
 REM CVS user  REM CVS user
 set CVSUSER=kabeleced  set CVSUSER=kabeleced
 REM CVSROOT  REM CVSROOT
 set CVSROOT=:pserver:%CVSUSER%@mozdev.org:/cvs  set CVSROOT=:pserver:%CVSUSER%@mozdev.org:/cvs
 REM Directory where the releases shall be saved  REM Directory where the releases shall be saved
 set REALEASEDIR=downloads  set REALEASEDIR=downloads
   REM Tool for zipping
   set ZIPTOOL=7za
   
   set /P USERTAG="Enter %MODULE% Tag to be checked out[%TAG%]: "
   if not "%USERTAG%X"=="X" (
           set TAG=%USERTAG%
   )
   
 @ECHO ON  
 REM Extract all .zip files  REM Extract all .zip files
 cd %TOOLDIR%  cd %TOOLDIR%
7za e -y *.zipif errorlevel 1 (
cd ..        echo ERROR: folder not available: %TOOLDIR%
REM CVS repository login) else (
cvs -d%CVSROOT% login        %ZIPTOOL% e -y *.zip
REM Create Addon building directory        if errorlevel 1 (
md build                echo ERROR: %ZIPTOOL%: %errorlevel%
cd build        ) else (
REM Checkout the source code files of the given tag based for the setup file                cd %CURRDIR%
REM Save the files of the 'src' directory in a new directory (option '-d %TAG%')                REM Remove old building directory of current CVS TAG and its content (/S)
cvs -d%CVSROOT% co -r %TAG% -d %TAG% %MODULE%/src                REM without any furhter question (/Q)
cd %TAG%                if exist %BUILDDIR%\%TAG% (
REM Create setup file named like the CVS tag                        rd %BUILDDIR%\%TAG% /S/Q
REM Exclude all CVS stuff                )
7za a -tzip %TAG%.xpi * -r -mx=9 -x!CVS*                REM create BUILDDIR if not exists
REM Move the setup file                if not exist %BUILDDIR% (
move %TAG%.xpi %CURRDIR%\%REALEASEDIR%                        md %BUILDDIR%
                 )
                 REM Checkout the source code files of the given tag based for the setup file
                 REM Save the files of the 'src' directory in a new directory (option '-d %TAG%')
                 echo.Check out %MODULE% sources of tag %TAG%:
                 echo.
                 @ECHO ON
                 cvs -d%CVSROOT% co -r %TAG% -d %BUILDDIR%\%TAG% %MODULE%/src
                 @ECHO OFF
                 if errorlevel 1 (
                         echo ERROR: cvs co: %errorlevel%
                 ) else (
                         cd %BUILDDIR%\%TAG%
                         REM Create setup file named like the CVS tag
                         REM Exclude all CVS stuff
                         %ZIPTOOL% a -tzip %TAG%.xpi * -r -mx=9 -x!CVS*
                         if errorlevel 1 (
                                 echo ERROR: %ZIPTOOL%: %errorlevel%
                         ) else (
                                 REM Move the setup file
                                 move %TAG%.xpi %CURRDIR%\%REALEASEDIR%
                                 if errorlevel 1 (
                                         echo ERROR: move: %errorlevel%
                                 )
                         )                       
                 )
         )
 )
 
 cd %CURRDIR%  cd %CURRDIR%
 REM Remove building directory and its content (/s) without any furhter question (/q)  
 rd build /s/q  
 REM Finished building .xpi file for foxfm CVS tag %TAG%.  REM Finished building .xpi file for foxfm CVS tag %TAG%.
 @ECHO OFF  
 pause  
   
   echo.&pause&goto:eof
   @ECHO ON
   

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>