diff options
author | Loïc Minier <lool@dooz.org> | 2010-01-03 08:25:19 +0100 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2010-01-03 08:25:19 +0100 |
commit | 0e12cc38636ed1841ff465e6aea134002ab066da (patch) | |
tree | 76a547fa63ce30c75cb35ca010aaeff1b81e7bb7 /pbuilder-buildpackage-funcs | |
parent | 4d656f9ba6d76dcfab0fe8f4ed4d645ec228dc90 (diff) | |
download | pbuilder-0e12cc38636ed1841ff465e6aea134002ab066da.tar pbuilder-0e12cc38636ed1841ff465e6aea134002ab066da.tar.gz |
Move ccache setup to pbuilder-buildpackage-funcs
Diffstat (limited to 'pbuilder-buildpackage-funcs')
-rw-r--r-- | pbuilder-buildpackage-funcs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pbuilder-buildpackage-funcs b/pbuilder-buildpackage-funcs index 023dbca..39f1e71 100644 --- a/pbuilder-buildpackage-funcs +++ b/pbuilder-buildpackage-funcs @@ -104,3 +104,16 @@ function createbuilduser () { unset LOGNAME || true fi } + +function setup_ccache() { + if [ -n "$CCACHEDIR" ]; then + log "I: Setting up ccache" + if ! [ -d "$BUILDPLACE/$CCACHEDIR" ]; then + mkdir -p "$BUILDPLACE/$CCACHEDIR" + fi + chown -R $BUILDUSERID:$BUILDUSERID "$BUILDPLACE/$CCACHEDIR" + # Unfortunate difference between pbuilder-style and ccache-style config + # env vars :-/ + export CCACHE_DIR="$CCACHEDIR" + fi +} |