Bug 375415, update packaging breaks with filenames containing a space, p=Rob Marshall (tH, rdmsoft@bugs.rdmsoft.com), r=bsmedberg
authornrthomas@gmail.com
Thu, 10 Jan 2008 12:59:46 -0800
changeset 10153 0f76ab30cdcd8b17a54d47682fb0f56471be52ac
parent 10152 bba65f6aeffc7860b7a22b9f07fbff0345fd2506
child 10154 6bb124779ffd43a9cbf7259808fccd56cbe5d3fa
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs375415
milestone1.9b3pre
Bug 375415, update packaging breaks with filenames containing a space, p=Rob Marshall (tH, rdmsoft@bugs.rdmsoft.com), r=bsmedberg
tools/update-packaging/common.sh
tools/update-packaging/make_incremental_update.sh
--- a/tools/update-packaging/common.sh
+++ b/tools/update-packaging/common.sh
@@ -96,16 +96,17 @@ append_remove_instructions() {
 # generated MAR files (see bug 306077). Pass a variable name and it will be
 # filled as an array.
 list_files() {
   count=0
 
   find . -type f \
     ! -name "channel-prefs.js" \
     ! -name "update.manifest" \
+    ! -name "temp-filelist" \
     | sed 's/\.\/\(.*\)/\1/' \
-    | sort > "$workdir/temp-filelist"
+    | sort > "temp-filelist"
   while read file; do
     eval "${1}[$count]=\"$file\""
     (( count++ ))
-  done < "$workdir/temp-filelist"
-  rm "$workdir/temp-filelist"
+  done < "temp-filelist"
+  rm "temp-filelist"
 }
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -145,17 +145,17 @@ done
 # Now, we just need to worry about newly added files
 num_newfiles=${#newfiles[*]}
 
 for ((i=0; $i<$num_newfiles; i=$i+1)); do
   f="${newfiles[$i]}"
 
   # If we've already tested this file, then skip it
   for ((j=0; $j<$num_oldfiles; j=$j+1)); do
-    if [ "\"$f\"" = "${oldfiles[j]}" ]; then
+    if [ "$f" = "${oldfiles[j]}" ]; then
       continue 2
     fi
   done
   
   dir=$(dirname "$workdir/$f")
   mkdir -p "$dir"
 
   $BZIP2 -cz9 "$newdir/$f" > "$workdir/$f"