Show
Ignore:
Timestamp:
05/12/08 16:58:05 (6 months ago)
Author:
BryanForbes
Message:

refs #6615.

  • Improved script by adding a function to take a list of files to remove.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • util/trunk/buildscripts/build_mini.sh

    r13583 r13708  
    1818# 
    1919#       NOTE: This is a fairly difinitive example of what is not needed (except in testing) ... 
     20 
     21rm_dojo_files () 
     22{ 
     23        for d in "$@" 
     24        do 
     25                if [ -e "dojo/$d" ]; then 
     26                        rm -rf "dojo/$d" 
     27                fi 
     28        done 
     29} 
    2030 
    2131echo "release: mini started" 
     
    4757 
    4858        # removed dijit tests 
    49         if [ -d dojo/dijit/tests ]; then 
    50                 rm -rf dojo/dijit/tests/  
    51         fi 
    52         # and demos 
    53         if [ -d dojo/dijit/demos ]; then 
    54                 rm -rf dojo/dijit/demos 
    55         fi 
    56         # and the benchTool 
    57         if [ -d dojo/dijit/bench ]; then 
    58                 rm -rf dojo/dijit/bench/ 
    59         fi 
    60         # the dojo tests 
    61         if [ -d dojo/dojo/tests ]; then 
    62                 rm -rf dojo/dojo/tests/ 
    63                 rm -f dojo/dojo/tests.js 
    64         fi       
    65         # and stray utils 
    66         if [ -d dojo/util ]; then  
    67                 rm -rf dojo/util/ 
    68         fi 
    69          
     59        rm_dojo_files "dijit/tests" "dijit/demos" "dijit/bench" "dojo/tests" "dojo/tests.js" "util" 
     60 
    7061        # noir isn't worth including yet 
    7162        if [ -d dojo/dijit/themes/noir ]; then 
     
    8475        # WARNING: templates have been inlined into the .js -- if you are using dynamic templates, 
    8576        # or other build trickery, these lines might not work! 
    86         rm -rf dojo/dijit/templates/ 
    87         rm -rf dojo/dijit/form/templates/ 
    88         rm -rf dojo/dijit/layout/templates/ 
     77        rm_dojo_files "dijit/templates" "dijit/form/templates" "dijit/layout/templates" 
     78 
    8979        # NOTE: we're not doing this in DojoX because the resources/ folder (to me) is deemed 
    9080        # ambigious, and should be treated on a per-project basis 
     
    9686        find ./dojo/dojox/ -name README -exec rm '{}' ';' 
    9787         
    98         # WARNING: if you care about _base existing (and not _always_ just dojo.js providing it) ... 
    99         if [ -d dojo/dojo/_base ]; then 
    100                 # ... then comment out theses lines: 
    101                 rm -rf dojo/dojo/_base/ 
    102                 rm -f dojo/dojo/_base.js 
    103         fi 
     88        # WARNING: if you care about _base existing (and not _always_ just dojo.js providing it) then comment this line: 
     89        rm_dojo_files "dojo/_base" "dojo/_base.js" 
     90 
    10491        # NOTE: we're not doing the above to dijit/_base/ because I secretly use dijit/_base functions 
    10592        # when only using dojo.js (place.js and sniff.js in particular), and mini would break stuff ... 
    10693 
    10794        # last but not least 
    108         rm -f dojo/dojo/build.txt 
     95        rm_dojo_files "dojo/build.txt" 
    10996         
    11097        cd ../util/buildscripts/