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
--- 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\""