Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Initial commit of the UConn GitHub batch installer.
  • Loading branch information
ejr06006 committed Feb 2, 2012
0 parents commit 4172203
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 0 deletions.
Binary file added 7zSD.sfx
Binary file not shown.
Binary file added Git-1.7.8-preview20111206.exe
Binary file not shown.
Binary file added Git.7z
Binary file not shown.
Binary file added GitExtensions228SetupComplete.msi
Binary file not shown.
73 changes: 73 additions & 0 deletions Install.bat
@@ -0,0 +1,73 @@
@echo off

set platform=x64
if NOT EXIST "%ProgramFiles(x86)%" set platform=x86

echo.
echo Installing UConn GitHub for Windows...
echo.

rem Prompt for Name and Email.
echo.
echo You need to enter some information so Git can be configured for you.
echo.
set /P name=Please enter your name:
set /P email=Please enter your email address:

rem Install Programs.
echo.
echo Installing Git...
start /w Git-1.7.8-preview20111206.exe /silent
echo Installing GitExtensions...
start /w msiexec /I GitExtensions228SetupComplete.msi SSHCLIENT="OpenSSH" INSTALLMSYSGIT="0" INSTALLKDIFF3="0" ALLUSERS="1" /quiet /passive
echo Installing KDiff3...
start /w KDiff3Setup_0.9.96.exe /S

if "%platform%"=="x64" goto path64
goto path86

rem ADD TO PATH (x64)
:path64
set GITPATH=C:\Program Files (x86)\Git\bin
goto :path

:path86
set GITPATH=C:\Program Files\Git\bin
goto :path

:path
setx PATH "%PATH%;%GITPATH%" -m >NUL

rem SET GIT CONFIGURATION
:config
"%GITPATH%\git" config --global core.editor notepad.exe
"%GITPATH%\git" config --global core.name %name%
"%GITPATH%\git" config --global core.email %email%

rem CHECK FOR SSH KEY. IF NOT DETECTED, GENERATE.
if not exist "%HOMEDRIVE%%HOMEPATH%\.ssh\id_rsa" (
mkdir "%HOMEDRIVE%%HOMEPATH%\.ssh"
"%GITPATH%\ssh-keygen.exe" -f "%HOMEDRIVE%%HOMEPATH%\.ssh\id_rsa" -t rsa -b 2048 -N '' -C "%name% <%email%>" >NUL
)

clip < "%HOMEDRIVE%%HOMEPATH%\.ssh\id_rsa.pub"

echo.
echo Your SSH key has been automatically generated and copied to your clipboard.
echo Click this window and then press any key to continue. Your web browser will open to UConn GitHub.
echo 1) Sign in if you have not already done so.
echo 2) Click "Account Settings" in the upper right corner of the page.
echo 3) Click "SSH Public Keys" on the left.
echo 4) Click "Add another public key".
echo 5) Paste (Control+V) into the "Key" box and Click "Add Key".
echo.

pause
start http://github.uconn.edu/account/ssh

:finish
echo.
echo Done! You can now close this window and start using Git / UConn GitHub.
echo.

pause >NUL
Binary file added KDiff3Setup_0.9.96.exe
Binary file not shown.
Binary file added UConnGitHub-v0.8.exe
Binary file not shown.
Binary file added clip.exe
Binary file not shown.
5 changes: 5 additions & 0 deletions config.txt
@@ -0,0 +1,5 @@
;!@Install@!UTF-8!
Title="UConn GitHub"
BeginPrompt="Do you want to install the UConn GitHub for Windows package?"
RunProgram="Install.bat"
;!@InstallEnd@!
Binary file added setx.exe
Binary file not shown.

0 comments on commit 4172203

Please sign in to comment.