Mercurial > pidgin.yaz
comparison pidgin/win32/nsis/generate_gtk_zip.sh @ 30427:23b3627ecec3
Add support for the binaries built by the opensuse build service to the
Gtk zip generation script. This isn't actually in use yet.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 21 May 2010 02:40:53 +0000 |
parents | 7fc10a9275ea |
children | c940e427e486 |
comparison
equal
deleted
inserted
replaced
30426:cbae3d450db8 | 30427:23b3627ecec3 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # Script to generate zip file for GTK+ runtime to be included in Pidgin installer | 2 # Script to generate zip file for GTK+ runtime to be included in Pidgin installer |
3 | 3 |
4 PIDGIN_BASE=$1 | 4 PIDGIN_BASE=$1 |
5 | 5 |
6 if [ ! -e $PIDGIN_BASE/ChangeLog.win32 ]; then | 6 if [ ! -e $PIDGIN_BASE/ChangeLog ]; then |
7 echo `basename $0` must must have the pidgin base dir specified as a parameter. | 7 echo $(basename $0) must must have the pidgin base dir specified as a parameter. |
8 exit 1 | 8 exit 1 |
9 fi | 9 fi |
10 | 10 |
11 STAGE_DIR=$PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage | 11 STAGE_DIR=$PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage |
12 #Subdirectory of $STAGE_DIR | 12 #Subdirectory of $STAGE_DIR |
40 echo Bundle Version $BUNDLE_VERSION > $CONTENTS_FILE | 40 echo Bundle Version $BUNDLE_VERSION > $CONTENTS_FILE |
41 | 41 |
42 function download_and_extract { | 42 function download_and_extract { |
43 URL=${1%%\ *} | 43 URL=${1%%\ *} |
44 NAME=${1#*\ } | 44 NAME=${1#*\ } |
45 FILE=`basename $URL` | 45 FILE=$(basename $URL) |
46 if [ ! -e $FILE ]; then | 46 if [ ! -e $FILE ]; then |
47 echo Downloading $NAME | 47 echo Downloading $NAME |
48 wget $URL | 48 wget $URL |
49 fi | |
50 EXTENSION=${FILE##*.} | |
51 #This is an OpenSuSE build service RPM | |
52 if [ $EXTENSION == 'rpm' ]; then | |
53 FILE=$(../rpm2zip.sh $FILE) | |
49 fi | 54 fi |
50 unzip -q $FILE -d $INSTALL_DIR | 55 unzip -q $FILE -d $INSTALL_DIR |
51 echo "$NAME" >> $CONTENTS_FILE | 56 echo "$NAME" >> $CONTENTS_FILE |
52 } | 57 } |
53 | 58 |
61 echo gtk-theme-name = \"MS-Windows\" > $INSTALL_DIR/etc/gtk-2.0/gtkrc | 66 echo gtk-theme-name = \"MS-Windows\" > $INSTALL_DIR/etc/gtk-2.0/gtkrc |
62 | 67 |
63 #Blow away translations that we don't have in Pidgin | 68 #Blow away translations that we don't have in Pidgin |
64 for LOCALE_DIR in $INSTALL_DIR/share/locale/* | 69 for LOCALE_DIR in $INSTALL_DIR/share/locale/* |
65 do | 70 do |
66 LOCALE=`basename $LOCALE_DIR` | 71 LOCALE=$(basename $LOCALE_DIR) |
67 if [ ! -e $PIDGIN_BASE/po/$LOCALE.po ]; then | 72 if [ ! -e $PIDGIN_BASE/po/$LOCALE.po ]; then |
68 echo Remove $LOCALE translation as it is missing from Pidgin | 73 echo Removing $LOCALE translation as it is missing from Pidgin |
69 rm -r $LOCALE_DIR | 74 rm -r $LOCALE_DIR |
70 fi | 75 fi |
71 done | 76 done |
72 | 77 |
73 #Generate zip file to be included in installer | 78 #Generate zip file to be included in installer |