From db463d4adc8a322bffc489b2020941ee4dd9c9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sun, 31 Jul 2016 09:19:28 +0200 Subject: [PATCH] do local checkout only, when doing the second time checkout on windows --- windows_cygwin/build.bat | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index b82bf2d4..4a3bbd6b 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -1,11 +1,16 @@ -choco install -y firefox googlechrome wget notepadplusplus +@echo on +choco install -y firefox googlechrome wget notepadplusplus sublimetext3 wget -c https://cygwin.com/setup-x86_64.exe setup-x86_64.exe -R "C:\cygwin64" -s http://cygwin.netbet.org/ -q -g -P curl,zsh,git,vim,wget,xz,tar,gawk,bzip2,subversion,zlib,fontconfig -c:\cygwin64\bin\bash.exe --login -c "cp -vr `cygpath $HOMEPATH`/.ssh $HOME/" -c:\cygwin64\bin\bash.exe --login -c "mkdir -pv $HOME/dev/" -c:\cygwin64\bin\bash.exe --login -c "git clone git@github.com:cyplo/dotfiles.git dev/dotfiles" +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% "mkdir -pv $HOME/dev/" -c:\cygwin64\bin\bash.exe --login -c "export DIR=$HOME/dev/dotfiles && export NOSUDO=true && export DONT_CHANGE_SHELL=true && bash $DIR/common/configure_fresh_system" +%bash% "git clone `cygpath $HOMEPATH`/dev/dotfiles $HOME/dev/dotfiles" +%bash% "cd $HOME/dev/dotfiles && git checkout $branch" +%bash% "export DIR=$HOME/dev/dotfiles && export NOSUDO=true && export DONT_CHANGE_SHELL=true && bash $DIR/common/configure_fresh_system"