Add basic Windows-specific git configs (#72)

This commit is contained in:
Cyryl Płotnicki 2017-01-24 19:53:30 +00:00 committed by GitHub
parent 5cb6378b5f
commit 3f00dfc2b5
8 changed files with 50 additions and 20 deletions

View file

@ -1,4 +1,3 @@
[include]
path = dev/dotfiles/.gitconfig_includes.common
path = dev/dotfiles/.gitconfig_includes.linux

View file

@ -1,4 +1,3 @@
[include]
path = dev/dotfiles/.gitconfig_includes.common
path = dev/dotfiles/.gitconfig_includes.mac

3
.gitconfig.windows Normal file
View file

@ -0,0 +1,3 @@
[include]
path = dev/dotfiles/.gitconfig_includes.common
path = dev/dotfiles/.gitconfig_includes.windows

View file

@ -1,3 +1,5 @@
[core]
autocrlf = false
[difftool "winmerge"]
cmd = 'C:/Program Files (x86)/WinMerge/WinMergeU.exe' "$(cygpath -wla $LOCAL)" "$(cygpath -wla $REMOTE)"
trustExitCode = false

View file

@ -0,0 +1,11 @@
[core]
autocrlf = false
[merge]
tool = p4merge
[mergetool "p4merge"]
path = C:/Program Files/Perforce/p4merge.exe
[diff]
tool = kdiff3
[difftool "kdiff3"]
path = C:/Program Files/KDiff3/kdiff3.exe
trustExitCode = false

View file

@ -136,7 +136,7 @@ if [[ -z $NORUBY ]]; then
source ~/.rvm/scripts/rvm
set -e
echo "Installing Ruby..."
rvm install 2.3.1 --disable-binary
rvm install ruby --disable-binary
fi
if [[ -z $NOVIM ]]; then

View file

@ -1,17 +1,30 @@
@echo on
choco install -y --allowEmptyChecksum firefox googlechrome wget notepadplusplus sublimetext3 mono monodevelop gtksharp visualstudiocode p4merge dotnet4.5 nodejs.install conemu dejavufonts ag golang wireshark procexp procmon drmemory.install WinPcap keepass.install nextcloud-client f.lux
choco upgrade -y all
call refreshenv
wget -c https://cygwin.com/setup-x86_64.exe
setup-x86_64.exe -R "C:\cygwin64" -s http://mirror.switch.ch/ftp/mirror/cygwin/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig,clang,cmake,lua,perl,the_silver_searcher,gnupg,patch,zlib-devel,openssl-devel,libyaml-devel,libyaml0_2,sqlite3,make,libtool,autoconf,automake,bison,m4,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core,patch,cygwin32-readline,libcrypt-devel,libcrypt0,ncurses,libncurses-devel,python-devel,libxslt,libxslt-devel,libjpeg-devel
copy /Y conemu.xml %appdata%\Roaming\ConEmu.xml
set script_path=%~dp0
set repo_path=%script_path%\..\
pushd %repo_path%
set repo_path=%CD%
popd
set bash=c:\cygwin64\bin\bash.exe --login -c
for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev-parse --abbrev-ref HEAD"') do set "branch=%%A"
%bash% 'echo "branch is $branch"'
%bash% "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/"
%bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh"
echo Configuring Windows-specific settings
echo %repo_path% is repo path
if not exist "%appdata%\Roaming\" mkdir "%appdata%\Roaming\"
IF EXIST "%appdata%\Roaming\ConEmu.xml" del /F "%appdata%\Roaming\ConEmu.xml"
mklink /h "%appdata%\Roaming\ConEmu.xml" "%repo_path%\conemu.xml"
IF EXIST "%HOMEPATH%\.gitconfig" del /F "%HOMEPATH%\.gitconfig"
mklink /h "%HOMEPATH%\.gitconfig" "%repo_path%\.gitconfig.windows

View file

@ -40,7 +40,10 @@ python /tmp/get-pip.py
# expose all the binaries fetched during the outer build
export PATH="$OUTER_CLONE:$PATH"
echo "Invoking common configuration script"
$DIR/common/configure_fresh_system.sh
echo "Making symlinks"
ln -vfs $DIR/windows_cygwin/.minttyrc $HOME/
ln -vfs "$DOTFILES_PATH/.gitconfig.cygwin" $HOME/.gitconfig
ln -vfs $DIR/.vimrc.cygwin $HOME/.vimrc