From 8773b12c2d1c16d5c7880a14d3f7438b6fc41b1e Mon Sep 17 00:00:00 2001
From: iven <ivenvd@gmail.com>
Date: Sat, 21 Jun 2014 12:12:11 +0800
Subject: [PATCH] Add `ccache` plugin

---
 plugins/README.markdown    | 1 +
 plugins/ccache/ccache.load | 9 +++++++++
 2 files changed, 10 insertions(+)
 create mode 100644 plugins/ccache/ccache.load

diff --git a/plugins/README.markdown b/plugins/README.markdown
index 1901725..0310504 100644
--- a/plugins/README.markdown
+++ b/plugins/README.markdown
@@ -3,6 +3,7 @@
 * __autojump__ - makes navigating filesystem much faster. see [autojump article](https://github.com/joelthelion/autojump/wiki) and [video](https://www.youtube.com/watch?v=tnNyoMGnbKg). bindings only, autojump needs to be installed separately.
 * __brew__  [Homebrew](http://brew.sh/) integration
 * __bundler__ use Ruby's [Bundler](http://bundler.io/) automatically for some commands
+* __ccache__ Enable [ccache](http://ccache.samba.org/) to speed up compilation
 * __django__  - helper for Django Unit tests. Cleans the cached modules as well.
 * __ec2__ - exports env variables for Amazon's EC2 management
 * __emoji-clock__ - The current time with half hour accuracy as an emoji symbol
diff --git a/plugins/ccache/ccache.load b/plugins/ccache/ccache.load
new file mode 100644
index 0000000..ec22c18
--- /dev/null
+++ b/plugins/ccache/ccache.load
@@ -0,0 +1,9 @@
+# Use ccache for building Android
+# See: https://source.android.com/source/initializing.html#setting-up-ccache
+set -gx USE_CCACHE 1
+
+if test -n "$CCACHE_ROOT"
+  _append_path $CCACHE_ROOT
+else
+  _append_path /usr/lib/ccache/bin
+end
-- 
GitLab