diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2005-06-17 11:42:53 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2005-06-17 11:42:53 +0000 |
commit | 32d7a746a20c42ea3aecc04d0d7fde6c04fc5193 (patch) | |
tree | 2e0a53163b6da5fa2977487b0ff6bde9118a5209 /pkgs | |
parent | aa0580143920485bf993e29536820abe2dc0b317 (diff) | |
download | nixlib-32d7a746a20c42ea3aecc04d0d7fde6c04fc5193.tar nixlib-32d7a746a20c42ea3aecc04d0d7fde6c04fc5193.tar.gz nixlib-32d7a746a20c42ea3aecc04d0d7fde6c04fc5193.tar.bz2 nixlib-32d7a746a20c42ea3aecc04d0d7fde6c04fc5193.tar.lz nixlib-32d7a746a20c42ea3aecc04d0d7fde6c04fc5193.tar.xz nixlib-32d7a746a20c42ea3aecc04d0d7fde6c04fc5193.tar.zst nixlib-32d7a746a20c42ea3aecc04d0d7fde6c04fc5193.zip |
* Move ensureDir() up, otherwise calls to fail() might fail.
svn path=/nixpkgs/trunk/; revision=3192
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 0115b78cf492..216205f4f764 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -37,6 +37,13 @@ if test -f $NIX_GCC/nix-support/setup-hook; then fi +# Ensure that the given directory exists. +ensureDir() { + local dir=$1 + if ! test -x "$dir"; then mkdir -p "$dir"; fi +} + + # Called when some build action fails. If $succeedOnFailure is set, # create the file `$out/nix-support/failed' to signal failure, and # exit normally. Otherwise, exit with failure. @@ -208,13 +215,6 @@ dumpVars() { } -# Ensure that the given directory exists. -ensureDir() { - local dir=$1 - if ! test -x "$dir"; then mkdir -p "$dir"; fi -} - - # Redirect stdout/stderr to a named pipe connected to a `tee' process # that writes the specified file (and also to our original stdout). # The original stdout is saved in descriptor 3. |