IrrecoBackgroundDlg *background_dlg variable name changed to self
[irreco.git] / script / theme-deb-creator.sh
blobe2ff06ec644b51e25ea5a86bd1ff15507c1e0864
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: theme-deb-creator.sh COMMAND"
21 echo ""
22 echo " Commands:"
23 echo " --deb | -deb | deb"
24 echo " This creates theme .deb's"
25 echo " of evil, scifi, sunflower, default, modern and white."
26 echo ""
29 make_deb()
32 # Check we are in scratchbox
33 if [[ "$_SBOX_DIR" == "" ||
34 "$_SBOX_RESTART_FILE" == "" ||
35 "$_SBOX_SHELL_PID" == "" ||
36 "$_SBOX_USER_GROUPNAME" == "" ]]; then
37 echo "Error: Need scratchbox."
38 exit 1
42 # Go to theme directory and build package
43 cd ../themes/default/
44 echo " Run dpkg-buildpackage for default theme"
45 dpkg-buildpackage -rfakeroot -i
47 if [[ "$?" == "1" ]]; then
48 echo ""
49 echo " Failed to build default theme package"
50 echo " Aborting"
51 echo ""
52 exit 1
56 # Go to theme directory and build package
57 cd ../evil/
58 echo " Run dpkg-buildpackage for evil theme"
59 dpkg-buildpackage -rfakeroot -i
61 if [[ "$?" == "1" ]]; then
62 echo ""
63 echo " Failed to build evil theme package"
64 echo " Aborting"
65 echo ""
66 exit 1
69 # Go to theme directory and build package
70 cd ../scifi/
71 echo " Run dpkg-buildpackage for scifi theme"
72 dpkg-buildpackage -rfakeroot -i
74 if [[ "$?" == "1" ]]; then
75 echo ""
76 echo " Failed to build scifi theme package"
77 echo " Aborting"
78 echo ""
79 exit 1
82 # Go to theme directory and build package
83 cd ../sunflower/
84 echo " Run dpkg-buildpackage for sunflower theme"
85 dpkg-buildpackage -rfakeroot -i
87 if [[ "$?" == "1" ]]; then
88 echo ""
89 echo " Failed to build sunflower theme package"
90 echo " Aborting"
91 echo ""
92 exit 1
95 # Go to theme directory and build package
96 cd ../modern/
97 echo " Run dpkg-buildpackage for modern theme"
98 dpkg-buildpackage -rfakeroot -i
100 if [[ "$?" == "1" ]]; then
101 echo ""
102 echo " Failed to build modern theme package"
103 echo " Aborting"
104 echo ""
105 exit 1
108 # Go to theme directory and build package
109 cd ../white/
110 echo " Run dpkg-buildpackage for white theme"
111 dpkg-buildpackage -rfakeroot -i
113 if [[ "$?" == "1" ]]; then
114 echo ""
115 echo " Failed to build white theme package"
116 echo " Aborting"
117 echo ""
118 exit 1
122 # Check there is place to ditch deb's
123 #echo " Check debs directory exists"
124 #if [ ! -e "../../debs/" ]; then
125 # mkdir -v ../../debs/
128 # Ditch .deb to correct directory
129 # echo " Move deb's and changes's"
130 #mv -fv ../irreco-theme-*.deb ../../debs/
131 #mv -fv ../irreco-theme-*.changes ../../debs/
136 main "$@"