chore: add code style scheme installer

Based on: https://github.com/square/java-code-styles/blob/master/install.sh
This commit is contained in:
nivl4 2016-04-27 10:43:56 +08:00
parent c42534f9a6
commit e490afbb85

24
install-codestyle.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash
# Installs Android's IntelliJ configs into your user configs.
# Script based on: https://github.com/square/java-code-styles/blob/master/install.sh
echo "Installing Android IntelliJ configs..."
for i 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 $i ]]; then
# Install codestyles
mkdir -p $i/codestyles
cp -fv AndroidStyle.xml $i/codestyles
fi
done
echo "Done."
echo ""
echo "Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'AndroidStyle'."