Skip to content

Commit ae3cd94

Browse files
committed
Support for Windows.
1 parent a874ed8 commit ae3cd94

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ IntelliJ IDEA code style settings for Square's Java and Android projects.
77
Installation
88
------------
99

10-
* Run the `install.sh` script.
10+
* On Unix, run the `install.sh` script. Windows users should use `install.bat` instead.
1111
* Restart IntelliJ if it's running.
1212
* Open IntelliJ Project Settings -> Code Styles, change the code style for the
1313
project to the one you want.

install.bat

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
REM Installs Square's IntelliJ configs into your user configs.
2+
@echo off
3+
echo Installing Square IntelliJ configs...
4+
5+
setlocal enableDelayedExpansion
6+
7+
for /D %%i in (%userprofile%\.AndroidStudio*) do call :copy_config %%i
8+
for /D %%i in (%userprofile%\.IdeaIC*) do call :copy_config %%i
9+
for /D %%i in (%userprofile%\.IntelliJIdea*) do call :copy_config %%i
10+
11+
echo.
12+
echo Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'Square' or 'SquareAndroid'.
13+
exit /b
14+
15+
REM sub function for copy config files
16+
:copy_config
17+
set config_dir=%~1\config
18+
echo Installing to !config_dir!
19+
xcopy /s configs !config_dir!
20+
echo Done.
21+
echo.
22+
exit /b

0 commit comments

Comments
 (0)