Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 947f3446d742421023c43a6601aa2bf4 > files > 2

ccache-3.1.4-4.fc15.i686.rpm

# Use ccache by default.  Users who don't want that can set the CCACHE_DISABLE
# environment variable in their personal profile.

case ":${PATH:-}:" in
    *:/usr/lib/ccache:*) ;;
    *) PATH="/usr/lib/ccache${PATH:+:$PATH}" ;;
esac

# If /var/cache/ccache is writable, use a shared cache there, except for root.
# Users who don't want that even if they have the write permission can set
# the CCACHE_DIR environment variable to another location and possibly unset
# the CCACHE_UMASK environment variables in their personal profile.

if [ -n "${CCACHE_DIR:-}" ] ; then
    if [ ! -w "$CCACHE_DIR" ] ; then
        # Reset broken settings maybe inherited when switching users (#651023).
        unset CCACHE_DIR
        unset CCACHE_UMASK
    fi
elif [ "${EUID:-}" != 0 ] ; then
    if [ -w /var/cache/ccache ] && [ -d /var/cache/ccache ] ; then
        # Set up the shared cache.
        export CCACHE_DIR=/var/cache/ccache
        export CCACHE_UMASK=002
        unset CCACHE_HARDLINK
    fi
fi