@@ -23,17 +23,15 @@ ANDROID_APP_ID=org.mozilla.firefox
2323
2424# If the command line argument is a tag name, check that out and build it
2525if [ -n " $1 " ] && [ " $2 " != " --no-recurse" ] && [ " $1 " != " --fast" ] ; then
26- BRANCH=` git branch | head -n 1 | cut -d \ -f 2-`
27- SUBDIR=checkout
28- [ -d $SUBDIR ] || mkdir $SUBDIR
29- cp -r -f -a .git $SUBDIR
30- cd $SUBDIR
31- git reset --hard " $1 "
32- # This is an optimization to get the OS reading the rulesets into RAM ASAP;
33- # it's useful on machines with slow disk seek times; there might be something
34- # better (vmtouch? readahead?) that tells the IO subsystem to read the files
35- # in whatever order it wants...
36- nohup cat src/chrome/content/rules/* .xml > /dev/null 2> /dev/null &
26+ BRANCH=` git branch | head -n 1 | cut -d \ -f 2-`
27+ SUBDIR=checkout
28+ [ -d $SUBDIR ] || mkdir $SUBDIR
29+ cp -r -f -a .git $SUBDIR
30+ cd $SUBDIR
31+ git reset --hard " $1 "
32+ # When a file are renamed, the old copy can linger in the checkout directory.
33+ # Ensure a clean build.
34+ git clean -fdx
3735
3836 # Use the version of the build script that was current when that
3937 # tag/release/branch was made.
@@ -51,10 +49,6 @@ if [ -n "$1" ] && [ "$2" != "--no-recurse" ] && [ "$1" != "--fast" ] ; then
5149 exit 0
5250fi
5351
54- # Same optimisation
55- nohup cat src/chrome/content/rules/* .xml > /dev/null 2> /dev/null &
56-
57-
5852if [ " $1 " != " --fast" -o ! -f " $RULESETS_SQLITE " ] ; then
5953 echo " Generating sqlite DB"
6054 python2.7 ./utils/make-sqlite.py
117111# The name/version of the XPI we're building comes from src/install.rdf
118112XPI_NAME=" pkg/$APP_NAME -` grep em:version src/install.rdf | sed -e ' s/[<>]/ /g' | cut -f3` "
119113if [ " $1 " ] && [ " $1 " != " --fast" ] ; then
120- XPI_NAME=" $XPI_NAME .xpi "
114+ XPI_NAME=" $XPI_NAME "
121115else
122116 # During development, generate packages named with the short hash of HEAD.
123- XPI_NAME=" $XPI_NAME ~` git rev-parse --short HEAD` "
117+ XPI_NAME=" $XPI_NAME ~` git rev-parse --short HEAD` "
124118 if ! git diff-index --quiet HEAD; then
125119 XPI_NAME=" $XPI_NAME -dirty"
126120 fi
0 commit comments