From ecdf44fe290a6e55ba83da2911a3dc044d7f47ac Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 13 Jun 2017 23:54:27 +0200 Subject: [PATCH] patchinstall.sh: Add workaround for mktemp on macOS <= 10.10. --- patches/patchinstall.sh | 3 ++- staging/patchinstall.sh.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index eecb020b..6a26362b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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 diff --git a/staging/patchinstall.sh.in b/staging/patchinstall.sh.in index 529bf703..ed547633 100644 --- a/staging/patchinstall.sh.in +++ b/staging/patchinstall.sh.in @@ -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