Skip to content

Conversation

slashmili
Copy link
Contributor

Find TMP dir based on OS default path

Find TMP dir based on OS default path
@CHH
Copy link
Member

CHH commented Mar 25, 2013

Thanks!

CHH added a commit that referenced this pull request Mar 25, 2013
Find TMP dir based on OS default path
@CHH CHH merged commit 769d46c into php-build:master Mar 25, 2013
@slashmili
Copy link
Contributor Author

BTW I just noticed that --dry-run is not supported in Mac OS!

TMP="$(dirname $(mktemp --dry-run 2>/dev/null|| echo "/var/tmp/tmp_dir"))/php-build"

Maybe you one to make it like this?

@CHH
Copy link
Member

CHH commented Mar 25, 2013

Fixed in 34b6d01, thanks again 😄

@hnw
Copy link
Contributor

hnw commented Mar 25, 2013

How about this? The mktemp commands in almost all OSs choose temporary directory as follows.

TMP=${TMPDIR:-/tmp}/php-build

See also : http://stackoverflow.com/questions/2792675/how-portable-is-mktemp1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants