[OpenWrt-Devel] [PATCH v2] scripts: fix ubinize-image on OS X

Álvaro Fernández Rojas noltari at gmail.com
Fri Mar 6 07:29:34 EST 2015


Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
v2: explain code as John suggested

 scripts/ubinize-image.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/ubinize-image.sh b/scripts/ubinize-image.sh
index 6762c22..b87cbb4 100755
--- a/scripts/ubinize-image.sh
+++ b/scripts/ubinize-image.sh
@@ -98,7 +98,11 @@ if [ ! -x "$ubinize" ]; then
 	exit 1
 fi
 
-ubinizecfg="$( mktemp )"
+ubinizecfg="$( mktemp 2> /dev/null )"
+if [ -z "$ubinizecfg" ]; then
+	# try OSX signature
+	ubinizecfg="$( mktemp -t 'ubitmp' )"
+fi
 ubilayout "$ubootenv" "$rootfs" "$kernel" > "$ubinizecfg"
 
 cat "$ubinizecfg"
@@ -108,4 +112,3 @@ err="$?"
 rm "$ubinizecfg"
 
 exit $err
-
-- 
2.3.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list