Bug 1446110: [update-packaging] Specify prefix for temporary files; r=bhearsum
authorTom Prince <mozilla@hocat.ca>
Thu, 15 Mar 2018 14:10:59 -0600
changeset 408642 4d434313555ab39636c97c528ff80481b5c0df39
parent 408641 eee1fae80932239c3a0c2c1bd9dd3bd784caad90
child 408643 a91bff97f39d7a1c74e9d5d8de88775d4d34a70a
push id100996
push userbtara@mozilla.com
push dateSat, 17 Mar 2018 10:37:43 +0000
treeherdermozilla-inbound@97160a734959 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhearsum
bugs1446110
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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\""