Skip to content

Instantly share code, notes, and snippets.

@thewisenerd
Created January 22, 2017 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thewisenerd/b40e3b6ae5d4943c6dfdf290b4b47996 to your computer and use it in GitHub Desktop.
Save thewisenerd/b40e3b6ae5d4943c6dfdf290b4b47996 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# gencache
pwd=$( pwd )
tc="aarch64-linux-android-4.9"
bin="aarch64-linux-android-"
mkdir -p ccache/bin
for file in ${pwd}/${tc}/bin/${bin}*; do
bname=$( basename ${file} )
rm -rf ccache/bin/${bname}
grep -qE "\-gcc\$" <<< ${bname}
if [ $? -eq 0 ]; then
ln -s "/usr/bin/ccache" ccache/bin/${bname}
else
ln -s ${file} ccache/bin/${bname}
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment