aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/mkcoverit.sh
blob: 2d54f7c66fa107580975b8e13cfd3561b26a8664 (plain) (blame)
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
44
45
46
47
48
#!/bin/bash
# This file is part of Firejail project
# Copyright (C) 2014-2024 Firejail Authors
# License GPL v2

# unpack firejail archive
ARCFIREJAIL=`ls *.tar.xz| grep firejail`
if [ "$?" -eq 0 ];
then
	echo "preparing $ARCFIREJAIL"
	DIRFIREJAIL=`basename $ARCFIREJAIL  .tar.xz`
	rm -fr $DIRFIREJAIL
	tar -xJvf $ARCFIREJAIL
	cd $DIRFIREJAIL
	./configure --prefix=/usr
	cd ..
else
	echo "Error: firejail source archive missing"
	exit 1
fi


# unpack firetools archive
ARCFIRETOOLS=`ls *.tar.bz2 | grep firetools`
if [ "$?" -eq 0 ];
then
	echo "preparing $ARCFIRETOOLS"
	DIRFIRETOOLS=`basename $ARCFIRETOOLS .tar.bz2`
	rm -fr $DIRFIRETOOLS
	tar -xjvf $ARCFIRETOOLS
	cd $DIRFIRETOOLS
	pwd
	./configure --prefix=/usr
	cd ..

else
	echo "Error: firetools source archive missing"
	exit 1
fi

# move firetools in firejail source tree
mkdir -p $DIRFIREJAIL/extras
mv $DIRFIRETOOLS $DIRFIREJAIL/extras/firetools

# build
cd $DIRFIREJAIL
cov-build --dir cov-int make -j 4 extras
tar czvf myproject.tgz cov-int