Skip to content

Commit

Permalink
* Conditionally run mktemp -t file for mac, else mktemp for linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeweber committed Aug 7, 2012
1 parent 0a72188 commit 7f3c524
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions android/gdb_apk
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@
# Returns the command's status
# Note: the command's stderr is lost
adb_shell () {
local tempname=`basename $0`
local TMPOUT=`mktemp -t ${tempname}` || exit 1
host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
case "${host_os}" in
"linux")
local TMPOUT="$(mktemp)"
;;
"mac")
local tempname=`basename $0`
local TMPOUT=`mktemp -t ${tempname}`
;;
local LASTLINE RET
local ADB=${ADB:-adb}

Expand Down

0 comments on commit 7f3c524

Please sign in to comment.