]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - scripts/debian-packaging.sh
Introduce kmem_scnprintf()
[FreeBSD/FreeBSD.git] / scripts / debian-packaging.sh
1 #!/bin/bash
2
3 #
4 # This script can be used to invoke OpenZFS build from native Debian
5 # packaging.
6 #
7
8 print_help ()
9 {
10         echo "Usage: $(basename $0) [OPTIONS]"
11         echo
12         echo "Options:"
13         echo " -b, --build              Build OpenZFS from Debian Packaging"
14         echo " -c, --clean              Clean the workspace"
15 }
16
17 if [ "$#" -ne 1 ]; then
18         print_help
19         exit 1
20 fi
21
22 case $1 in
23         -b|--build)
24                 cp -r contrib/debian debian
25                 debuild -i -us -uc -b && fakeroot debian/rules override_dh_binary-modules
26                 ;;
27         -c|--clean)
28                 fakeroot debian/rules override_dh_auto_clean
29                 rm -rf debian
30                 ;;
31         *)
32                 print_help
33                 ;;
34 esac
35
36 exit 0