Mostly minor fixes up until version 0.8.10.
[irreco.git] / script / lirc-deb-creator.sh
blobc0255f4282d4941017846a8f2f7d4c369bdaa918
1 #!/bin/bash
3 # Go to folder where this file lies.
4 cd `dirname "$0"`
6 main()
8 case "$1" in
9 --deb|-deb|deb|.deb|debaa|debbaa|debioi)
10 make_deb;;
12 info_print;
13 exit 1;;
14 esac
17 info_print()
19 echo ""
20 echo " Usage: lirc-deb-creator.sh COMMAND"
21 echo ""
22 echo " Commands:"
23 echo " --deb | -deb | deb"
24 echo " This creates lirc .deb into ../debs/"
25 echo " Packaging requires that you have packaged and"
26 echo " installet Irreco dev package into Scratchbox."
27 echo ""
30 make_deb()
33 # Check we are in scratchbox
34 if [[ "$_SBOX_DIR" == "" ||
35 "$_SBOX_RESTART_FILE" == "" ||
36 "$_SBOX_SHELL_PID" == "" ||
37 "$_SBOX_USER_GROUPNAME" == "" ]]; then
38 echo "Error: Need scratchbox."
39 exit 1
42 # Go to irtrans backend directory, clean stuff and build package
43 cd ../backend/lirc/trunk/
44 echo " Run autoclean"
45 ./autoclean.sh
46 echo " Run dpkg-buildpackage"
47 dpkg-buildpackage -rfakeroot -i
49 # Check there is place to ditch deb
50 if [ ! -e "../../../debs/" ]; then
51 mkdir -v ../../../debs/
54 # Ditch .deb to correct directory
55 #mv -fv ../irreco-backend-lirc* ../../../debs/
57 # Do cleaning
58 echo " Do clean"
59 #./autoclean.sh
60 echo " Done clean"
64 main "$@"