Make scp.bat match ssh.bat (which properly checks .ssh)


Change-Id: I7c4ca20453c5c26c788fb3cac9104af0868df6d6
diff --git a/scp.bat b/scp.bat
index 28a51c3..37bd93d 100644
--- a/scp.bat
+++ b/scp.bat
@@ -1,4 +1,4 @@
 @echo off



-"%~dp0git-1.9.5.chromium.6_bin\bin\scp.exe" %*

+"%~dp0\scp.cmd" %*

diff --git a/scp.cmd b/scp.cmd
new file mode 100644
index 0000000..36070f9
--- /dev/null
+++ b/scp.cmd
@@ -0,0 +1,24 @@
+@rem Do not use "echo off" to not affect any child calls.



+@rem Get the abolute path to the Git installation root.

+@for /F "delims=" %%I in ("%~dp0.\git-1.9.5.chromium.6_bin") do @set git_install_root=%%~fI

+@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH%


+:: Set the HOME variable to depot_tools (the parent of this directory's parent).

+@if not exist "%HOME%" @for /F "delims=" %%I in ("%~dp0") do @set HOME=%%~fI


+:: Set up default SSH directory for this user in their home directory.

+@if not exist "%HOME%\.ssh" @mkdir "%HOME%\.ssh"

+@if not exist "%HOME%\.ssh\config" (

+  echo Installing default ssh_config ...

+  @copy "%~dp0..\ssh_config" "%HOME%\.ssh\config" >nul




+@scp.exe -F "%HOME%\.ssh\config" %*

+@set ErrorLevel=%ErrorLevel%

+@goto quit



+@"%COMSPEC%" /c exit /b %ErrorLevel%