View difference between Paste ID: f62a29ec6 and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | #!/bin/sh |
2 | ||
3 | echo "*************************************" | |
4 | echo " Welcome to Mac4Lin v1.0 Installer " | |
5 | echo "*************************************" | |
6 | echo | |
7 | echo | |
8 | echo | |
9 | ||
10 | echo "Installing Mac4Lin UI..." | |
11 | #tar -xzf GTK/Mac4Lin_GTK_v1.0_RC.tar.gz -C ~/.themes/ | |
12 | #tar -xzf GTK/Mac4Lin_GTK_Graphite_v1.0_RC.tar.gz -C ~/.themes/ | |
13 | #tar -xzf GTK/Mac4Lin_MacMenu_v1.0_RC.tar.gz -C ~/.themes/ | |
14 | #tar -xzf GTK/Mac4Lin_MacMenu_Graphite_v1.0_RC.tar.gz -C ~/.themes/ | |
15 | #tar -xzf GTK/Mac4Lin_Meta_v1.0_RC.tar.gz -C ~/.themes/ | |
16 | cp -r GTK/Mac4Lin_Aqua/ ~/.themes/ | |
17 | cp -r GTK/Mac4Lin_Graphite/ ~/.themes/ | |
18 | cp -r GTK/Mac4Lin_GTK/ ~/.themes/ | |
19 | cp -r GTK/Mac4Lin_GTK_Graphite/ ~/.themes/ | |
20 | cp -r GTK/Mac4Lin_MacMenu/ ~/.themes/ | |
21 | cp -r GTK/Mac4Lin_MacMenu_Graphite/ ~/.themes/ | |
22 | ||
23 | #gconftool-2 --type string --set /desktop/gnome/interface/gtk_theme "Mac4Lin_GTK_v1.0_RC" | |
24 | gconftool-2 --type string --set /desktop/gnome/interface/gtk_theme "Mac4Lin_GTK" | |
25 | #gconftool-2 --type string --set /apps/metacity/general/theme "Mac4Lin_GTK_v1.0_RC" | |
26 | gconftool-2 --type string --set /apps/metacity/general/theme "Mac4Lin_GTK" | |
27 | gconftool-2 --set /apps/metacity/general/button_layout --type string "close,minimize,maximize:menu" | |
28 | gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons "true" | |
29 | gconftool-2 --type string --set /desktop/gnome/interface/toolbar_style "icons" | |
30 | ||
31 | echo "Done!" | |
32 | echo | |
33 | ||
34 | echo "Installing Mac4Lin Icons..." | |
35 | #tar -xzf Icons/Mac4Lin_Icons_v1.0_RC.tar.gz -C ~/.icons/ | |
36 | cp -r Icons/Mac4Lin_Icons/ ~/.icons/ | |
37 | gconftool-2 --type string --set /desktop/gnome/interface/icon_theme "Mac4Lin_Icons" | |
38 | ||
39 | ||
40 | echo "Done!" | |
41 | echo | |
42 | ||
43 | echo "Installing Mac4Lin Cursors..." | |
44 | #tar -xzf Cursors/Mac4Lin_Cursors_v1.0_RC.tar.gz -C ~/.icons/ | |
45 | cp -r Cursor/Mac4Lin_Cursors/ ~/.icons/ | |
46 | ||
47 | echo "Done! Please enable the cursor theme from Appearances." | |
48 | echo | |
49 | ||
50 | echo "Installing Mac4Lin Emerald Window Borders..." | |
51 | #tar -xzf Emerald/Mac4Lin_Emerald_v1.0_RC.tar.gz -C ~/.emerald/themes | |
52 | #tar -xzf Emerald/Mac4Lin_Graphite_Emerald_v1.0_RC.tar.gz -C ~/.emerald/themes | |
53 | #tar -xzf Emerald/Mac4Lin_Emerald_v1.0_RC.tar.gz -C ~/.emerald/theme | |
54 | mkdir -p ~/.emerald/themes | |
55 | cp -r Emerald/Mac4Lin_Emerald/ ~/.emerald/themes/ | |
56 | cp -r Emerald/Mac4Lin_Graphite_Emerald/ ~/.emerald/themes/ | |
57 | cp -r Emerald/Mac4Lin_Emerald/ ~/.emerald/theme/ | |
58 | ||
59 | echo "Done!" | |
60 | echo | |
61 | ||
62 | echo "Installing Mac4Lin misc. components..." | |
63 | echo "Note: There are missing fonts in subversion, need to install them manually ..." | |
64 | mkdir -p ~/.purple/plugins | |
65 | #cp Pidgin/pidgin_awn.so ~/.purple/plugins/ | |
66 | cp Pidgin/Plugin/pidgin_awn.so ~/.purple/plugins/ | |
67 | # Where to copy mac4lin/Pidgin/Mac4Lin_Pidgin/pidgin ?? | |
68 | mkdir -p ~/.xmms/Skins | |
69 | mkdir -p ~/.bmp/Skins | |
70 | #cp MP/Mac4Lin_MP_v1.0_RC.tar.gz ~/.xmms/Skins/ | |
71 | #cp MP/Mac4Lin_MP_v1.0_RC.tar.gz ~/.bmp/Skins/ | |
72 | cp -r MP/Mac4Lin_MP/ ~/.xmms/Skins/ | |
73 | cp -r MP/Mac4Lin_MP/ ~/.bmp/Skins/ | |
74 | gconftool-2 --type boolean --set /apps/gnome-session/options/show_splash_screen FALSE | |
75 | #gconftool-2 --type string --set /apps/panel/toplevels/top_panel_screen0/background/image "~/.themes/Mac4Lin_GTK_v1.0_RC/gtk-2.0/Panel/panel-bg-trans.png" | |
76 | mkdir -p ~/.fonts | |
77 | #tar -xzf Fonts/fonts.tar.gz -C ~/.fonts/ | |
78 | # needs more tweaks !!!!!! | |
79 | cp -r Fonts/Fonts/*.* ~/.fonts/ | |
80 | #mkdir -p ~/Mac4Lin_v1.0_RC/GRUB | |
81 | #mkdir -p ~/Mac4Lin_v1.0_RC/Usplash | |
82 | #mkdir -p ~/Mac4Lin_v1.0_RC/AWN | |
83 | #mkdir -p ~/Mac4Lin_v1.0_RC/Mozilla | |
84 | #mkdir -p ~/Mac4Lin_v1.0_RC/Rhythmbox_AWN | |
85 | mkdir -p ~/Mac4Lin/GRUB | |
86 | mkdir -p ~/Mac4Lin/Usplash | |
87 | mkdir -p ~/Mac4Lin/AWN | |
88 | mkdir -p ~/Mac4Lin/Mozilla | |
89 | mkdir -p ~/Mac4Lin/Rhythmbox_AWN | |
90 | ||
91 | #cp GRUB/*.* ~/Mac4Lin_v1.0_RC/GRUB/ | |
92 | #cp Usplash/*.* ~/Mac4Lin_v1.0_RC/Usplash/ | |
93 | cp -r GRUB/*.* ~/Mac4Lin/GRUB/ | |
94 | cp -r Usplash/*.* ~/Mac4Lin/Usplash/ | |
95 | ||
96 | #cp AWN/*.* ~/Mac4Lin_v1.0_RC/AWN | |
97 | #cp Mozilla/*.* ~/Mac4Lin_v1.0_RC/Mozilla | |
98 | #cp Rhythmbox_AWN/*.* ~/Mac4Lin_v1.0_RC/Rhythmbox_AWN | |
99 | cp -r AWN/*.* ~/Mac4Lin/AWN | |
100 | cp -r Mozilla/*.* ~/Mac4Lin/Mozilla | |
101 | # We copy a tarball, we need to make the tarball first | |
102 | #cd Rhythmbox_AWN/Mac4Lin_Rhythmbox-AWN | |
103 | #tar -czf Rhythmbox_AWN/Mac4Lin_Rhythmbox-AWN.tar.gz *.* | |
104 | #cd ../.. | |
105 | cp -r Rhythmbox_AWN/*.* ~/Mac4Lin/Rhythmbox_AWN | |
106 | ||
107 | echo | |
108 | echo "The following componenets require root access. You can opt out of installing them as they can be manually installed as well." | |
109 | echo "Would you like to install these components [y/n]? " | |
110 | read ans | |
111 | ||
112 | if [ $ans = y -o $ans = Y ]; then | |
113 | ||
114 | echo "Installing Mac4Lin GDM Login Theme and Sounds..." | |
115 | #sudo tar -xzf GDM/Mac4Lin_GDM_v1.0_RC.tar.gz -C /usr/share/gdm/themes/ | |
116 | #sudo tar -xzf Sounds/Mac4Lin_Sounds_v1.0_RC.tar.gz -C /usr/share/sounds/ | |
117 | #sudo tar -xzf Sounds/Mac4Lin_Pidgin-Sounds_v1.0_RC.tar.gz -C /usr/share/sounds/ | |
118 | sudo cp -r GDM/Mac4Lin_GDM/ /usr/share/gdm/themes/ | |
119 | sudo cp -r Sounds/Mac4Lin_Sounds/ /usr/share/sounds/ | |
120 | sudo cp -r Sounds/Mac4Lin_Pidgin-Sounds/ /usr/share/sounds/ | |
121 | ||
122 | echo | |
123 | echo "Setting GDM Theme" | |
124 | echo | |
125 | ||
126 | THEME_DIR=/usr/share/gdm/themes | |
127 | #THEMES=Mac4Lin_GDM_v1.0_RC | |
128 | THEMES=Mac4Lin_GDM | |
129 | N=`echo $THEMES | wc -w` | |
130 | sudo sed -i.old s/GraphicalTheme=.*/GraphicalTheme=`echo $THEMES | cut -d ' ' -f $N`/ /etc/gdm/gdm.conf | |
131 | ||
132 | THEME_DIR=~/.themes | |
133 | #THEMES=Mac4Lin_GTK_v1.0_RC | |
134 | THEMES=Mac4Lin_GTK | |
135 | N=`echo $THEMES | wc -w` | |
136 | sudo sed -i.old s/GtkTheme=.*/GtkTheme=`echo $THEMES | cut -d ' ' -f $N`/ /etc/gdm/gdm.conf | |
137 | echo | |
138 | echo "Done!" | |
139 | echo "Please assign the sounds to events manually. All sounds are saved in /usr/share/sounds" | |
140 | echo | |
141 | echo | |
142 | ||
143 | echo | |
144 | echo "removing ..._V1.0_RC... string from Theme names" | |
145 | echo | |
146 | ||
147 | THEMES_ICONS=Mac4Lin_Icons | |
148 | THEMES_CURSORS=Mac4Lin_Cursors | |
149 | ||
150 | sed -i.old s/Name=.*/Name=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_GTK/index.theme | |
151 | sed -i.old s/GtkTheme=.*/GtkTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_GTK/index.theme | |
152 | sed -i.old s/MetacityTheme=.*/MetacityTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_GTK/index.theme | |
153 | ||
154 | sed -i.old s/Name=.*/Name=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_GTK_Graphite/index.theme | |
155 | sed -i.old s/GtkTheme=.*/GtkTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_GTK_Graphite/index.theme | |
156 | sed -i.old s/MetacityTheme=.*/MetacityTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_GTK_Graphite/index.theme | |
157 | ||
158 | sed -i.old s/Name=.*/Name=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_MacMenu/index.theme | |
159 | sed -i.old s/GtkTheme=.*/GtkTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_MacMenu/index.theme | |
160 | sed -i.old s/MetacityTheme=.*/MetacityTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_MacMenu/index.theme | |
161 | ||
162 | sed -i.old s/Name=.*/Name=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_MacMenu_Graphite/index.theme | |
163 | sed -i.old s/GtkTheme=.*/GtkTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_MacMenu_Graphite/index.theme | |
164 | sed -i.old s/MetacityTheme=.*/MetacityTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_MacMenu_Graphite/index.theme | |
165 | ||
166 | sed -i.old s/GtkTheme=.*/GtkTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Aqua/index.theme | |
167 | sed -i.old s/MetacityTheme=.*/MetacityTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Aqua/index.theme | |
168 | sed -i.old s/IconTheme=.*/IconTheme=`echo $THEMES_ICONS | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Aqua/index.theme | |
169 | sed -i.old s/CursorTheme=.*/CursorTheme=`echo $THEMES_CURSORS | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Aqua/index.theme | |
170 | ||
171 | sed -i.old s/GtkTheme=.*/GtkTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Graphite/index.theme | |
172 | sed -i.old s/MetacityTheme=.*/MetacityTheme=`echo $THEMES | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Graphite/index.theme | |
173 | sed -i.old s/IconTheme=.*/IconTheme=`echo $THEMES_ICONS | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Graphite/index.theme | |
174 | sed -i.old s/CursorTheme=.*/CursorTheme=`echo $THEMES_CURSORS | cut -d ' ' -f $N`/ ~/.themes/Mac4Lin_Graphite/index.theme | |
175 | ||
176 | sed -i.old s/Name=.*/Name=`echo $THEMES_CURSORS | cut -d ' ' -f $N`/ ~/.icons/Mac4Lin_Cursors/index.theme | |
177 | ||
178 | echo "Done!" | |
179 | echo | |
180 | ||
181 | # WALLPAPERS ARE NOT IN SUBVERSION! | |
182 | #echo "Installing Mac4Lin Backgrounds..." | |
183 | #sudo cp Wallpapers/*.* /usr/share/backgrounds | |
184 | #gconftool-2 --type string --set /desktop/gnome/background/picture_filename "/usr/share/backgrounds/Mac4Lin_Wallpaper1.jpg" | |
185 | ||
186 | echo "Mac4Lin Backgrounds are not in Subversion, please use the tarball to manually install them..." | |
187 | key="" | |
188 | echo -n "Press any key to continue..." | |
189 | stty -icanon | |
190 | key=`dd count=1 2>/dev/null` | |
191 | stty icanon | |
192 | echo | |
193 | ||
194 | echo "Done!" | |
195 | echo | |
196 | ||
197 | ||
198 | echo | |
199 | echo "Installing Pidgin theme..." | |
200 | #mkdir -p ~/Mac4Lin_v1.0_RC/Backup | |
201 | #tar -cf ~/Mac4Lin_v1.0_RC/Backup/pidgin_backup.tar.gz /usr/share/pixmaps/pidgin/ | |
202 | #sudo tar -xzf Pidgin/Mac4Lin_Pidgin_v1.0_RC.tar.gz -C /usr/share/pixmaps/ | |
203 | mkdir -p ~/Mac4Lin/Backup | |
204 | tar -cf ~/Mac4Lin/Backup/pidgin_backup.tar.gz /usr/share/pixmaps/pidgin/ | |
205 | sudo cp -r Pidgin/Mac4Lin_Pidgin/pidgin/ /usr/share/pixmaps/ | |
206 | ||
207 | echo "Done!" | |
208 | echo "The current Pidgin theme has been backed up as ~/Mac4Lin/Backup/pidgin_backup.tar.gz" | |
209 | echo "Note that Mac4Lin will be in your home folder" | |
210 | echo "Please enable the Pidgin AWN plugin from within Pidgin and place a launcher for Pidgin on AWN" | |
211 | echo | |
212 | ||
213 | else | |
214 | ||
215 | echo "Components requiring root access not installed. Kindly install them manually" | |
216 | ||
217 | fi | |
218 | ||
219 | echo "****************************************" | |
220 | echo " Mac4Lin installation complete!" | |
221 | echo " Please refer to the documentation for" | |
222 | echo " advanced installation instructions" | |
223 | echo " (for installing usplash, grub etc.)" | |
224 | echo " For best results, log off and log back" | |
225 | echo " in for all changes to be effected" | |
226 | echo "****************************************" | |
227 | ||
228 | echo | |
229 | key="" | |
230 | echo -n "Press any key to continue..." | |
231 | stty -icanon | |
232 | key=`dd count=1 2>/dev/null` | |
233 | stty icanon | |
234 | echo |