habitica-android/install-codestyle.sh
Daniel Gomez Rico 62b73bbccf Rename code style with habitica
Having it as AndroidStyle may overlap with a style from a user´
2017-10-12 19:28:29 -05:00

24 lines
757 B
Bash
Executable file

#!/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 'HabiticaAndroidStyle'."