Bug 1446110: [update-packaging] Specify prefix for temporary files; r=bhearsum draft
authorTom Prince <mozilla@hocat.ca>
Thu, 15 Mar 2018 14:10:59 -0600
changeset 768353 48775eba4f934fd244a74da615bc7754370b504e
parent 767919 fcb11e93adf57210167de0b27b15433e9c3f45e4
push id102863
push userbmo:mozilla@hocat.ca
push dateFri, 16 Mar 2018 05:44:32 +0000
reviewersbhearsum
bugs1446110
milestone61.0a1
Bug 1446110: [update-packaging] Specify prefix for temporary files; r=bhearsum Thunderbird is currently still building on macOS, where `mktemp` requires an argument. MozReview-Commit-ID: DCoZAYA6tTI
tools/update-packaging/common.sh
--- a/tools/update-packaging/common.sh
+++ b/tools/update-packaging/common.sh
@@ -191,36 +191,36 @@ append_remove_instructions() {
     fi
   done <"$listfile"
 }
 
 # List all files in the current directory, stripping leading "./"
 # Pass a variable name and it will be filled as an array.
 list_files() {
   count=0
-  tmpfile="$(mktemp)"
+  tmpfile="$(mktemp temp-filelist.XXXXXX)"
   find . -type f \
     ! -name "update.manifest" \
     ! -name "updatev2.manifest" \
     ! -name "updatev3.manifest" \
-    ! -name "temp-dirlist" \
-    ! -name "temp-filelist" \
+    ! -name "temp-dirlist.*" \
+    ! -name "temp-filelist.*" \
     | sed 's/\.\/\(.*\)/\1/' \
     | sort -r > "${tmpfile}"
   while read -r file; do
     eval "${1}[$count]=\"$file\""
     (( count++ ))
   done <"${tmpfile}"
   rm -f "${tmpfile}"
 }
 
 # List all directories in the current directory, stripping leading "./"
 list_dirs() {
   count=0
-  tmpfile="$(mktemp)"
+  tmpfile="$(mktemp temp-dirlist.XXXXXX)"
 
   find . -type d \
     ! -name "." \
     ! -name ".." \
     | sed 's/\.\/\(.*\)/\1/' \
     | sort -r > "${tmpfile}"
   while read -r dir; do
     eval "${1}[$count]=\"$dir\""