2017-12-29 18:20:03 +00:00
|
|
|
#!/bin/sh
|
2017-12-25 16:01:03 +00:00
|
|
|
|
2018-02-08 16:41:30 +00:00
|
|
|
# CCACHEDIR - for pbuilder ; CCACHE_DIR - for ccache
|
|
|
|
|
|
|
|
echo "CCACHEDIR=$CCACHEDIR CCACHE_DIR=$CCACHE_DIR SET_CCACHEDIR=$SET_CCACHEDIR"
|
|
|
|
|
2018-02-13 18:00:06 +00:00
|
|
|
[ -z "$CCACHE_DIR" ] && export CCACHE_DIR=${CCACHEDIR:=${SET_CCACHEDIR=/var/cache/pbuilder/ccache}}
|
|
|
|
|
2018-02-08 16:41:30 +00:00
|
|
|
if [ -n "$CCACHE_DIR" ]; then
|
2018-11-27 16:11:46 +00:00
|
|
|
mkdir -p $CCACHE_DIR $DISTCC_DIR ||:
|
|
|
|
chown -R $BUILDUSERID:$BUILDUSERID $CCACHE_DIR $DISTCC_DIR ||:
|
|
|
|
chmod -R a+rwx $CCACHE_DIR $DISTCC_DIR ||:
|
2018-01-20 02:35:16 +00:00
|
|
|
fi
|
2018-01-15 18:57:10 +00:00
|
|
|
|
2019-06-04 13:03:22 +00:00
|
|
|
[ $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
|
|
|
|
|
2018-05-14 17:28:26 +00:00
|
|
|
df -h
|
2018-01-15 18:57:10 +00:00
|
|
|
ccache --show-stats
|
2019-05-15 17:19:39 +00:00
|
|
|
ccache --zero-stats
|
|
|
|
ccache --max-size=${CCACHE_SIZE:=32G}
|