diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat old mode 100644 new mode 100755 index b5be8569..5e57d0c8 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -4,16 +4,11 @@ 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 +set script_path=%~dp0 +set repo_path=%script_path%\..\ 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/" -%bash% "rm -fr $HOME/dev/dotfiles" -%bash% "git clone `cygpath $HOMEPATH`/dev/dotfiles $HOME/dev/dotfiles" -%bash% "cd $HOME/dev/dotfiles && git remote set-url origin git@github.com:cyplo/dotfiles.git" -%bash% "cd $HOME/dev/dotfiles && git checkout $branch" -%bash% "cd $HOME/dev/dotfiles && git pull" -%bash% "export DIR=$HOME/dev/dotfiles && NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system" - +%bash% "export OUTER_CLONE=`cygpath $repo_path` && $script_path/build_insider.sh" diff --git a/windows_cygwin/build_insider.sh b/windows_cygwin/build_insider.sh new file mode 100755 index 00000000..6987aae9 --- /dev/null +++ b/windows_cygwin/build_insider.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +DOTFILES_PATH="$HOME/dev/dotfiles" +mkdir -pv $HOME/dev/ +rm -fr $DOTFILES_PATH + +git clone "$OUTER_CLONE" "$DOTFILES_PATH" +cd "$DOTFILES_PATH" +git remote set-url origin git@github.com:cyplo/dotfiles.git +git checkout $branch +git pull +export DIR=$DOTFILES_PATH && NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system" +