-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcreate_deb.sh
executable file
·33 lines (27 loc) · 977 Bytes
/
create_deb.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
33
#!/bin/bash
# to create a valid package we need to be root
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=291320
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# maybe an earlier run of this script failed
rm -rf hid-retrobit
# create working directory
mkdir -p hid-retrobit/etc/udev/rules.d
mkdir -p hid-retrobit/etc/modules-load.d
mkdir -p hid-retrobit/usr/src/hid-retrobit-1.0.0
# copy necessary files
cp -R DEBIAN hid-retrobit/
cp 99-hid-retrobit.rules hid-retrobit/etc/udev/rules.d/
cp hid-retrobit.conf hid-retrobit/etc/modules-load.d/
cp COPYING hid-retrobit/usr/src/hid-retrobit-1.0.0/
cp DETAILS.md hid-retrobit/usr/src/hid-retrobit-1.0.0/
cp dkms.conf hid-retrobit/usr/src/hid-retrobit-1.0.0/
cp hid-retrobit.c hid-retrobit/usr/src/hid-retrobit-1.0.0/
cp Makefile hid-retrobit/usr/src/hid-retrobit-1.0.0/
cp README.md hid-retrobit/usr/src/hid-retrobit-1.0.0/
# create package
dpkg-deb --build hid-retrobit
# cleanup
rm -rf hid-retrobit