Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find TMP dir based on OS default path #113

Merged
merged 1 commit into from
Mar 25, 2013
Merged

Find TMP dir based on OS default path #113

merged 1 commit into from
Mar 25, 2013

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