diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-11-28 21:39:21 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-11-28 21:39:21 -0500 |
commit | 3387af6b2afa9a7dde9cc685cd40d10741cc4a3a (patch) | |
tree | 3a9d326c49b6240e2c2aa1f7c2f2033cc55189c0 | |
parent | src/sandbox.sh: produce it from configure (diff) | |
download | sandbox-3387af6b2afa9a7dde9cc685cd40d10741cc4a3a.tar.gz sandbox-3387af6b2afa9a7dde9cc685cd40d10741cc4a3a.tar.bz2 sandbox-3387af6b2afa9a7dde9cc685cd40d10741cc4a3a.zip |
sandbox.bashrc: fix ccache default for non-root
Don't set the CCACHE_DIR to /root/.ccache if it isn't actually writable
(i.e. running as non-root).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | data/sandbox.bashrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/sandbox.bashrc b/data/sandbox.bashrc index 9a59613..5e8c564 100644 --- a/data/sandbox.bashrc +++ b/data/sandbox.bashrc @@ -95,7 +95,7 @@ if [[ ${SANDBOX_INTRACTV} == "1" && -t 1 ]] ; then sandboxon() { export SANDBOX_ON="1" ; } sandboxoff() { export SANDBOX_OFF="0" ; } - [[ -z ${CCACHE_DIR} ]] && export CCACHE_DIR=/root/.ccache + [[ -z ${CCACHE_DIR} ]] && [[ -w /root/.ccache ]] && export CCACHE_DIR=/root/.ccache for var in CCACHE_DIR DISTCC_DIR ; do [[ ${!var+set} == "set" ]] && addwrite ${!var} done |