Created
January 22, 2017 06:36
-
-
Save thewisenerd/b40e3b6ae5d4943c6dfdf290b4b47996 to your computer and use it in GitHub Desktop.
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
#!/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