patchinstall.sh: Add workaround for mktemp on macOS <= 10.10.

(cherry picked from commit ecdf44fe29)
This commit is contained in:
Sebastian Lackner 2017-06-13 23:54:27 +02:00
parent c0525850fc
commit 199b98a78b
2 changed files with 4 additions and 2 deletions

View File

@ -2685,7 +2685,8 @@ fi
# If autoupdate is enabled then create a tempfile to keep track of all patches
if test "$enable_patchlist" -eq 1; then
if test "$enable_Staging" -eq 1; then
patchlist=$(mktemp)
# macOS 10.10 and prior do not allow mktemp with empty argument
patchlist=$(mktemp 2>/dev/null || mktemp -t tmp)
if test ! -f "$patchlist"; then
abort "Unable to create temporary file for patchlist."
fi

View File

@ -435,7 +435,8 @@ patch_apply()
# If autoupdate is enabled then create a tempfile to keep track of all patches
if test "$enable_patchlist" -eq 1; then
if test "$enable_Staging" -eq 1; then
patchlist=$(mktemp)
# macOS 10.10 and prior do not allow mktemp with empty argument
patchlist=$(mktemp 2>/dev/null || mktemp -t tmp)
if test ! -f "$patchlist"; then
abort "Unable to create temporary file for patchlist."
fi