summaryrefslogtreecommitdiff
path: root/makexpi.sh
blob: 7ed4bddd91768e61088c6c02b3a9b5de4a822ab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e

cd "$(dirname $0)"

version="$(grep em:version src/install.rdf)"
version="${version#*<em:version>}"
version="${version%</em:version>*}"
XPI_NAME="pkg/${PWD##*/}-$version~$(git rev-parse --short HEAD)"
if ! git diff-index --quiet HEAD; then
    XPI_NAME="$XPI_NAME-dirty"
fi
XPI_NAME="${XPI_NAME}.xpi"

[ -d pkg ] || mkdir pkg

cd src

# Build the XPI!
rm -f "../$XPI_NAME"

exec python2 ../utils/create_xpi.py -n "../$XPI_NAME" "."