Last active
April 29, 2017 04:43
-
-
Save hktonylee/4ce08a6b0591bd55da1763fb2b1dd470 to your computer and use it in GitHub Desktop.
Replace buildToolsVersion in all build.gradle in node_modules
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 | |
targetVersion="$1" | |
if [ "$1" == "" ]; then | |
echo "Usage: $0 <buildToolsVersion>"; | |
else | |
find \ | |
node_modules \ | |
-type f \ | |
-iname 'build.gradle' \ | |
-exec sed -i '' 's/buildToolsVersion "[0-9][0-9]\.[0-9]\.[0-9]"/buildToolsVersion "'${targetVersion}'"/g' "{}" +; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment