Skip to content

Commit 4ab4e96

Browse files
committed
More makexpi.sh cleanup.
Tabs -> spaces Remove preload statement in recursive mode, unnecessarily complicated. Clean checkout directory before building. Remove line that adds a .xpi incorrectly to XPI_NAME.
1 parent 2af2957 commit 4ab4e96

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

makexpi.sh

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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
2525
if [ -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
5250
fi
5351

54-
# Same optimisation
55-
nohup cat src/chrome/content/rules/*.xml >/dev/null 2>/dev/null &
56-
57-
5852
if [ "$1" != "--fast" -o ! -f "$RULESETS_SQLITE" ] ; then
5953
echo "Generating sqlite DB"
6054
python2.7 ./utils/make-sqlite.py
@@ -117,10 +111,10 @@ fi
117111
# The name/version of the XPI we're building comes from src/install.rdf
118112
XPI_NAME="pkg/$APP_NAME-`grep em:version src/install.rdf | sed -e 's/[<>]/ /g' | cut -f3`"
119113
if [ "$1" ] && [ "$1" != "--fast" ] ; then
120-
XPI_NAME="$XPI_NAME.xpi"
114+
XPI_NAME="$XPI_NAME"
121115
else
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

Comments
 (0)