forked from DataSoft/Nova
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenerateDebs
executable file
·50 lines (35 loc) · 936 Bytes
/
generateDebs
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
49
#!/bin/bash
cleanup()
{
echo "Quitting debian package generation..."
exit 0
}
set -e
trap cleanup SIGINT
echo -e "Remember to update debian/changelog with current version and notes."
if [ -z $1 ]; then
echo -e "Using default version number in version.txt..."
VERSION=$(cat Installer/userFiles/config/version.txt)
else
VERSION=$1
fi
PACKAGE="nova_$VERSION"
echo "Package name is $PACKAGE"
rm -f configure
make clean
rm -fr Quasar/node_modules
#cd into the directory where the script is
cd "$(dirname "$PACKAGE")"
# copy the files into a staging directory
rm -rf $PACKAGE
rm -f ../$PACKAGE.orig.tar.gz
mkdir $PACKAGE
cp -a $(ls -1 | grep -v $PACKAGE | grep -v "debian") $PACKAGE
#tarball it up!
tar -zcf ../$PACKAGE.orig.tar.gz $PACKAGE
#remove the staging directory
rm -rf $PACKAGE
#Produce the debian package
dpkg-buildpackage -k7F9F2E1F
# Use this to make a signed source package for the PPA
#debuild -S -k7F9F2E1F