Skip to content

Instantly share code, notes, and snippets.

@reporter123
Last active January 7, 2018 19:04
Show Gist options
  • Save reporter123/9eabff6b30a9527fd34a293553bca6da to your computer and use it in GitHub Desktop.
Save reporter123/9eabff6b30a9527fd34a293553bca6da to your computer and use it in GitHub Desktop.
Work around to enable color output when using ccache + update-altertentives with clang.
#! /bin/bash
cc.debian -fdiagnostics-color=auto $*
@reporter123
Copy link
Author

On Debian systems dpkg-divert must be used to diver /usr/bin/cc to /usr/bin/cc.debian and /usr/bin/c++ to /usr/bin/c++.debian
This allows seamless integration and keeps the script from being replaced during updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment