bug 403770: update testing/release to support bz2 packages. r=rhelmer, patch=me
authorbhearsum@mozilla.com
Thu, 15 Nov 2007 07:56:57 -0800
changeset 8038 b707f0b4626537e4942e2f7e2507fc7c95ce1f86
parent 8037 eec62631eae00438e6e7937ffec84c3fc1fad0a4
child 8039 04330548dec8da3b49c54e991fdffa2b098f95a9
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrhelmer
bugs403770
milestone1.9b2pre
bug 403770: update testing/release to support bz2 packages. r=rhelmer, patch=me
testing/release/common/unpack.sh
testing/release/l10n/verify_l10n.sh
--- a/testing/release/common/unpack.sh
+++ b/testing/release/common/unpack.sh
@@ -29,15 +29,24 @@ unpack_build () {
               for file in *.xpi
               do
                 unzip -o $file > /dev/null
               done
               unzip -o ${locale}.xpi > /dev/null
             fi
             ;;
         linux-i686|linux|Linux_x86-gcc|Linux_x86-gcc3)
-            tar xfz ../"$pkg_file" > /dev/null
+            if `echo $pkg_file | grep -q "tar.gz"`
+            then
+                tar xfz ../"$pkg_file" > /dev/null
+            elif `echo $pkg_file | grep -q "tar.bz2"`
+            then
+                tar xfj ../"$pkg_file" > /dev/null
+            else
+                echo "Unknown package type for file: $pkg_file"
+                exit 1
+            fi
             ;;
     esac
 
     popd > /dev/null
 
 }
--- a/testing/release/l10n/verify_l10n.sh
+++ b/testing/release/l10n/verify_l10n.sh
@@ -12,21 +12,25 @@ fi
 
 for platform in linux-i686 win32 mac
 do
   rm -rf source/*
   # unpack_build platform dir_name pkg_file
   unpack_build $platform source $release/*.en-US.${platform}.*
   # check for read-only files
   find "./source" -not -perm -u=w -exec echo "FAIL read-only file" {} \;
-  locales=`ls $release/*.${platform}.* | grep -v en-US | cut -d\. -f8`
-  for l in $locales
+
+  for package in `find $release -maxdepth 1 -iname "*.$platform.*" | \
+                  grep -v 'en-US'`
   do
+    # strip the directory portion
+    package=`basename $package`
+    locale=`echo $package | sed -e 's/\.$platform.*//' -e 's/.*\.//'`
     rm -rf target/*
-    unpack_build ${platform} target $release/*.${l}.${platform}.*
+    unpack_build $platform target $release/$package
     # check for read-only files
     find "./target" -not -perm -u=w -exec echo "FAIL read-only file" {} \;
     mkdir -p $release/diffs
-    diff -r source target > $release/diffs/${platform}.${l}.diff
+    diff -r source target > $release/diffs/$platform.$locale.diff
   done
 done
 
 exit 0