diff 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
line wrap: on
line diff
--- a/pidgin/win32/nsis/generate_gtk_zip.sh	Fri May 21 00:44:38 2010 +0000
+++ b/pidgin/win32/nsis/generate_gtk_zip.sh	Fri May 21 02:40:53 2010 +0000
@@ -3,8 +3,8 @@
 
 PIDGIN_BASE=$1
 
-if [ ! -e $PIDGIN_BASE/ChangeLog.win32 ]; then
-	echo `basename $0` must must have the pidgin base dir specified as a parameter.
+if [ ! -e $PIDGIN_BASE/ChangeLog ]; then
+	echo $(basename $0) must must have the pidgin base dir specified as a parameter.
 	exit 1
 fi
 
@@ -42,11 +42,16 @@
 function download_and_extract {
 	URL=${1%%\ *}
 	NAME=${1#*\ }
-	FILE=`basename $URL`
+	FILE=$(basename $URL)
 	if [ ! -e $FILE ]; then
 		echo Downloading $NAME
 		wget $URL
 	fi
+	EXTENSION=${FILE##*.}
+	#This is an OpenSuSE build service RPM
+	if [ $EXTENSION == 'rpm' ]; then
+		FILE=$(../rpm2zip.sh $FILE)
+	fi
 	unzip -q $FILE -d $INSTALL_DIR
 	echo "$NAME" >> $CONTENTS_FILE
 }
@@ -63,9 +68,9 @@
 #Blow away translations that we don't have in Pidgin
 for LOCALE_DIR in $INSTALL_DIR/share/locale/*
 do
-	LOCALE=`basename $LOCALE_DIR`
+	LOCALE=$(basename $LOCALE_DIR)
 	if [ ! -e $PIDGIN_BASE/po/$LOCALE.po ]; then
-		echo Remove $LOCALE translation as it is missing from Pidgin
+		echo Removing $LOCALE translation as it is missing from Pidgin
 		rm -r $LOCALE_DIR
 	fi
 done