theme-deb-creator now creates all theme packages.
[irreco.git] / script / themedefault-deb-creator.sh
blobb24b5737dd56f83403ae3ba333dfd2f52895923b
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 into ../debs/"
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 -B
46 if [[ "$?" == "1" ]]; then
47 echo ""
48 echo " Failed to build default theme package"
49 echo " Aborting"
50 echo ""
51 exit 1
55 # Go to theme directory and build package
56 cd ../evil/
57 echo " Run dpkg-buildpackage for evil theme"
58 dpkg-buildpackage -rfakeroot -B
59 if [[ "$?" == "1" ]]; then
60 echo ""
61 echo " Failed to build evil theme package"
62 echo " Aborting"
63 echo ""
64 exit 1
67 # Go to theme directory and build package
68 cd ../scifi/
69 echo " Run dpkg-buildpackage for scifi theme"
70 dpkg-buildpackage -rfakeroot -B
71 if [[ "$?" == "1" ]]; then
72 echo ""
73 echo " Failed to build scifi theme package"
74 echo " Aborting"
75 echo ""
76 exit 1
79 # Go to theme directory and build package
80 cd ../sunflower/
81 echo " Run dpkg-buildpackage for sunflower theme"
82 dpkg-buildpackage -rfakeroot -B
83 if [[ "$?" == "1" ]]; then
84 echo ""
85 echo " Failed to build sunflower theme package"
86 echo " Aborting"
87 echo ""
88 exit 1
91 # Go to theme directory and build package
92 cd ../modern/
93 echo " Run dpkg-buildpackage for modern theme"
94 dpkg-buildpackage -rfakeroot -B
95 if [[ "$?" == "1" ]]; then
96 echo ""
97 echo " Failed to build modern theme package"
98 echo " Aborting"
99 echo ""
100 exit 1
103 # Go to theme directory and build package
104 cd ../white/
105 echo " Run dpkg-buildpackage for white theme"
106 dpkg-buildpackage -rfakeroot -B
107 if [[ "$?" == "1" ]]; then
108 echo ""
109 echo " Failed to build white theme package"
110 echo " Aborting"
111 echo ""
112 exit 1
116 # Check there is place to ditch deb's
117 echo " Check debs directory exists"
118 if [ ! -e "../../debs/" ]; then
119 mkdir -v ../../debs/
122 # Ditch .deb to correct directory
123 echo " Move deb's and changes's"
124 mv -fv ../irreco-theme-*.deb ../../debs/
125 mv -fv ../irreco-theme-*.changes ../../debs/
130 main "$@"