forked from GKFX/hide-ff-title-bar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·32 lines (27 loc) · 1.01 KB
/
build.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
#!/bin/bash -e
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
#
heading() {
echo
echo ====== "$1" ======
}
heading "Removing artifacts directory"
rm -rf web-ext-artifacts/
heading "Building Debian package"
TMPFILE=$(mktemp -d -p /dev/shm)
mkdir -p ${TMPFILE}/usr/lib/mozilla/native-messaging-hosts/
mkdir -p ${TMPFILE}/opt/hide-ff-title-bar/
mkdir ${TMPFILE}/DEBIAN/
cp native/hide_title_bar.json ${TMPFILE}/usr/lib/mozilla/native-messaging-hosts/
cp native/native.py ${TMPFILE}/opt/hide-ff-title-bar/
cp native/control ${TMPFILE}/DEBIAN/
dpkg-deb --build ${TMPFILE} native/hide-title-bar-for-firefox.deb
rm -rf ${TMPFILE}
heading "Building WebExtension"
# Files not distributed:
# Build script is provided to reviewers separately
# native/control gets put into the .deb without modification
web-ext build --ignore-files build.sh native/control