Added internal-lirc-backend and stuff.
[irreco.git] / script / mythtv-deb-creator.sh
bloba30f8ce42a597d66620e80df050d1232cd6e4057
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: mythtv-deb-creator.sh COMMAND"
21 echo ""
22 echo " Commands:"
23 echo " --deb | -deb | deb"
24 echo " This creates mythtv .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 and build package
43 cd ../backend/mythtv/trunk/
44 echo " Run dpkg-buildpackage"
45 dpkg-buildpackage -rfakeroot -i
47 # Check there is place to ditch deb
48 if [ ! -e "../../../debs/" ]; then
49 mkdir -v ../../../debs/
52 # Ditch .deb to correct directory
53 #mv -fv ../irreco-backend-mythtv* ../../../debs/
58 main "$@"