-
-
Save puccaso/c2b66434d89e4ae9f0724ed602b63a34 to your computer and use it in GitHub Desktop.
Ubuntu distcc & ccache setup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get install -y distcc distcc-pump ccache | |
sed -ie 's/STARTDISTCC="false"/STARTDISTCC="true"/' /etc/default/distcc | |
sed -ie 's/ALLOWEDNETS="127.0.0.1"/ALLOWEDNETS="192.168.0.0\/16 172.16.0.0\/12 10.0.0.0\/8"/' /etc/default/distcc | |
sed -ie 's/LISTENER="127.0.0.1"/LISTENER="0.0.0.0"/' /etc/default/distcc | |
sed -ie "s/JOBS=\"\"/JOBS=\"`grep processor /proc/cpuinfo | wc -l`\"/" /etc/default/distcc | |
sed -ie 's/ZEROCONF="false"/ZEROCONF="true"/' /etc/default/distcc | |
service distcc restart | |
echo 'CCACHE_PREFIX="distcc"' > /etc/profile.d/ccache-distcc.sh | |
echo 'CC="ccache gcc"' >> /etc/profile.d/ccache-distcc.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment