-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.sh
executable file
·30 lines (25 loc) · 1.21 KB
/
package.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
#!/bin/bash
packageName=network-analysis
version=1.0
if [ ! -f "network-analysis" ]
then
echo "Error: You must build the project before making a Debian package"
exit
fi
mkdir ${packageName}_${version}
mkdir ${packageName}_${version}/usr
mkdir ${packageName}_${version}/usr/local
mkdir ${packageName}_${version}/usr/local/bin
cp network-analysis ${packageName}_${version}/usr/local/bin
mkdir ${packageName}_${version}/DEBIAN
echo "Package: $packageName" >> ${packageName}_${version}/DEBIAN/control
echo "Version: $version" >> ${packageName}_${version}/DEBIAN/control
echo "Section: base" >> ${packageName}_${version}/DEBIAN/control
echo "Priority: optional" >> ${packageName}_${version}/DEBIAN/control
echo "Architecture: amd64" >> ${packageName}_${version}/DEBIAN/control
echo "Depends:" >> ${packageName}_${version}/DEBIAN/control
echo "Maintainer: Gautier Jousset <gautier.jousset@epitech.eu>, Julien Luino <julien.luino@epitech.eu>" >> ${packageName}_${version}/DEBIAN/control
echo "Description: Network Security 1 module project" >> ${packageName}_${version}/DEBIAN/control
echo " Socket reader application" >> ${packageName}_${version}/DEBIAN/control
dpkg-deb --build ${packageName}_${version}
rm -rf ${packageName}_${version}