forked from GCX-HCI/grandcentrix-AndroidCodeStyle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·27 lines (22 loc) · 913 Bytes
/
install.sh
File metadata and controls
executable file
·27 lines (22 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Installs GCX AndroidStudio Code Style into your AndroidStudio codestyles folder.
# Inspired by https://git.io/v7jmC
echo "Installing GCX AndroidStudio code style..."
echo ""
LATEST_CODE_STYLE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/styles/grandcentrix.xml"
for TARGET_DIR in $HOME/Library/Preferences/AndroidStudio* \
$HOME/Library/Preferences/AndroidStudioPreview* \
~/.AndroidStudio*/config \
~/.AndroidStudioPreview*/config
do
if [[ -d $TARGET_DIR ]]; then
# create codestyles dir and ...
mkdir -p ${TARGET_DIR}/codestyles
# ... copy to latest style to ${TARGET_DIR}
echo "Copying..."
cp -frv ${LATEST_CODE_STYLE} ${TARGET_DIR}/codestyles
fi
done
echo ""
echo "Done."
echo "Restart AndroidStudio. Go to Preferences->Editor->Code Style and apply Scheme 'grandcentrix'."