ClickHouse/debian/pbuilder-hooks/A00ccache

23 lines
657 B
Plaintext
Raw Normal View History

2017-12-29 18:20:03 +00:00
#!/bin/sh
2019-06-27 14:08:29 +00:00
# set -x
# CCACHEDIR - for pbuilder ; CCACHE_DIR - for ccache
echo "CCACHEDIR=$CCACHEDIR CCACHE_DIR=$CCACHE_DIR SET_CCACHEDIR=$SET_CCACHEDIR"
[ -z "$CCACHE_DIR" ] && export CCACHE_DIR=${CCACHEDIR:=${SET_CCACHEDIR=/var/cache/pbuilder/ccache}}
if [ -n "$CCACHE_DIR" ]; then
mkdir -p $CCACHE_DIR $DISTCC_DIR ||:
chown -R $BUILDUSERID:$BUILDUSERID $CCACHE_DIR $DISTCC_DIR ||:
chmod -R a+rwx $CCACHE_DIR $DISTCC_DIR ||:
fi
2019-06-27 14:08:29 +00:00
[ $CCACHE_PREFIX = 'distcc' ] && mkdir -p $DISTCC_DIR && echo "localhost/`nproc`" >> $DISTCC_DIR/hosts && distcc --show-hosts
2018-05-14 17:28:26 +00:00
df -h
ccache --show-stats
2019-05-15 17:19:39 +00:00
ccache --zero-stats
ccache --max-size=${CCACHE_SIZE:=32G}