ClickHouse/debian/pbuilder-hooks/A00ccache

23 lines
748 B
Bash
Executable File

#!/bin/sh
# 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
[ $CCACHE_PREFIX = 'distcc' ] && mkdir -p ~/.distcc && echo "localhost/`nproc`" >> ~/.distcc/hosts
# [ $CCACHE_PREFIX = 'distcc' ] && mkdir -p /etc/distcc/ && echo "localhost/`nproc`" >> /etc/distcc/hosts
# distcc --show-hosts
df -h
ccache --show-stats
ccache --zero-stats
ccache --max-size=${CCACHE_SIZE:=32G}