Skip to content

Instantly share code, notes, and snippets.

@futabooo
Last active November 15, 2015 17:22
Show Gist options
  • Save futabooo/20513ee54c8afd05b4b8 to your computer and use it in GitHub Desktop.
Save futabooo/20513ee54c8afd05b4b8 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Installs AndroidStyle IntelliJ configs into your user configs.
# Reference https://github.com/square/java-code-styles/blob/master/install.sh
echo "Installing AndroidStyle IntelliJ configs..."
for dirs in $HOME/Library/Preferences/IntelliJIdea* \
$HOME/Library/Preferences/IdeaIC* \
$HOME/Library/Preferences/AndroidStudio* \
$HOME/.IntelliJIdea*/config \
$HOME/.IdeaIC*/config \
$HOME/.AndroidStudio*/config
do
if [ -d $dirs ]; then
# Install codestyles
mkdir -p $dirs/codestyles
curl -L https://raw.githubusercontent.com/android/platform_development/master/ide/intellij/codestyles/AndroidStyle.xml \
> $dirs/codestyles/AndroidStyle.xml
fi
done
echo "Done."
echo ""
echo "Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'AndroidStyle' or '."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment