-
Notifications
You must be signed in to change notification settings - Fork 4
/
buildit.sh
43 lines (39 loc) · 949 Bytes
/
buildit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
if [ ! `which rsync` ] ; then
echo "Requires rsync"
exit 1
fi
if [ ! `which zip` ] ; then
echo "Requires zip"
exit 1
fi
if [ ! `which perl` ] ; then
echo "Requires perl"
exit 1
fi
EXTENSION=operator
rm *.xpi
rm -rf $EXTENSION
mkdir $EXTENSION
cd $EXTENSION
rsync -r --exclude=.svn --exclude-from=../excludefile.txt ../* .
VERSION=`grep "em:version" install.rdf | sed -e 's/^[ \t]*//g' | sed -e 's/<[^>]*>//g'`
rm chrome.manifest
rm chrome.manifest.flat
mv chrome.manifest.jar chrome.manifest
cd chrome
cd content
export VERSION=$VERSION
perl -pi -e 's/0.0.0/$ENV{"VERSION"}/gi' operator.js
perl -pi -e 's/0.0.0/$ENV{"VERSION"}/gi' operator_options.xul
cd ../
zip -r $EXTENSION.jar content locale skin
rm -rf content
rm -rf locale
rm -rf skin
cd ../..
cd $EXTENSION
#VERSION=`grep "em:version" install.rdf | sed -e 's/[ \t]*em:version=//;s/"//g'`
XPINAME=$EXTENSION-$VERSION
zip -r -D ../$XPINAME.xpi *
cd ..
rm -rf $EXTENSION