Debugging opts
[irreco.git] / script / theme-deb-creator.sh
blobdab134127f9ebb8997f94189b9ff66c2f0367e3a
1 #!/bin/bash
3 # Go to folder where this file lies.
4 cd `dirname "$0"`
6 main()
8 echo ""
9 echo "This script is deprecated, do not use."
10 echo "Instead run \"/themes/make source\", sign and send to maemo.org"
11 echo ""
12 exit 1;
13 case "$1" in
14 --deb|-deb|deb|.deb|debaa|debbaa|debioi)
15 make_deb;;
17 info_print;
18 exit 1;;
19 esac
22 info_print()
24 echo ""
25 echo " Usage: theme-deb-creator.sh COMMAND"
26 echo ""
27 echo " Commands:"
28 echo " --deb | -deb | deb"
29 echo " This creates theme .deb's"
30 echo " of evil, scifi, sunflower, default, modern and white."
31 echo ""
34 make_deb()
37 # Check we are in scratchbox
38 if [[ "$_SBOX_DIR" == "" ||
39 "$_SBOX_RESTART_FILE" == "" ||
40 "$_SBOX_SHELL_PID" == "" ||
41 "$_SBOX_USER_GROUPNAME" == "" ]]; then
42 echo "Error: Need scratchbox."
43 exit 1
47 # Go to theme directory and build package
48 cd ../themes/default/
49 echo " Run dpkg-buildpackage for default theme"
50 dpkg-buildpackage -rfakeroot -i
52 if [[ "$?" == "1" ]]; then
53 echo ""
54 echo " Failed to build default theme package"
55 echo " Aborting"
56 echo ""
57 exit 1
61 # Go to theme directory and build package
62 cd ../evil/
63 echo " Run dpkg-buildpackage for evil theme"
64 dpkg-buildpackage -rfakeroot -i
66 if [[ "$?" == "1" ]]; then
67 echo ""
68 echo " Failed to build evil theme package"
69 echo " Aborting"
70 echo ""
71 exit 1
74 # Go to theme directory and build package
75 cd ../scifi/
76 echo " Run dpkg-buildpackage for scifi theme"
77 dpkg-buildpackage -rfakeroot -i
79 if [[ "$?" == "1" ]]; then
80 echo ""
81 echo " Failed to build scifi theme package"
82 echo " Aborting"
83 echo ""
84 exit 1
87 # Go to theme directory and build package
88 cd ../sunflower/
89 echo " Run dpkg-buildpackage for sunflower theme"
90 dpkg-buildpackage -rfakeroot -i
92 if [[ "$?" == "1" ]]; then
93 echo ""
94 echo " Failed to build sunflower theme package"
95 echo " Aborting"
96 echo ""
97 exit 1
100 # Go to theme directory and build package
101 cd ../modern/
102 echo " Run dpkg-buildpackage for modern theme"
103 dpkg-buildpackage -rfakeroot -i
105 if [[ "$?" == "1" ]]; then
106 echo ""
107 echo " Failed to build modern theme package"
108 echo " Aborting"
109 echo ""
110 exit 1
113 # Go to theme directory and build package
114 cd ../white/
115 echo " Run dpkg-buildpackage for white theme"
116 dpkg-buildpackage -rfakeroot -i
118 if [[ "$?" == "1" ]]; then
119 echo ""
120 echo " Failed to build white theme package"
121 echo " Aborting"
122 echo ""
123 exit 1
127 # Check there is place to ditch deb's
128 #echo " Check debs directory exists"
129 #if [ ! -e "../../debs/" ]; then
130 # mkdir -v ../../debs/
133 # Ditch .deb to correct directory
134 # echo " Move deb's and changes's"
135 #mv -fv ../irreco-theme-*.deb ../../debs/
136 #mv -fv ../irreco-theme-*.changes ../../debs/
141 main "$@"