From 41e380c57c66a5397f6908cab9f8bb2c4a888219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:05:47 +0200 Subject: [PATCH 01/23] link in the already downloaded repo on windows --- windows_cygwin/build.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index 94f1c10f..64c17db8 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -2,4 +2,6 @@ choco install -y firefox googlechrome wget wget -c https://cygwin.com/setup-x86_64.exe REM cygwin installation 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 +c:\cygwin64\bin\bash.exe --login -c "mkdir -v $HOME/dev/" +c:\cygwin64\bin\bash.exe --login -c "ln -vfs `cygpath $HOMEPATH`/dev/dotfiles $HOME/dev" From e1963ba1004ecf981b6329a36e4b1613a93c7e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:08:05 +0200 Subject: [PATCH 02/23] exit common configure script if DIR not set --- common/configure_fresh_system | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 4fc49505..4ddb709a 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -13,7 +13,11 @@ fi CURL="curl -sSf" -#submodules +if [[ -z $DIR ]]; then + echo "please set DIR" + exit 1 +fi + DIR=`realpath $DIR` echo "using $DIR as the top level directory" cd $DIR From 38e40c85b913a75bf1904caf43187461b5f9cd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:13:01 +0200 Subject: [PATCH 03/23] do not quit if ~/dev already exists on windows --- windows_cygwin/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index 64c17db8..eb5006c5 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -2,6 +2,6 @@ choco install -y firefox googlechrome wget wget -c https://cygwin.com/setup-x86_64.exe REM cygwin installation 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 -c:\cygwin64\bin\bash.exe --login -c "mkdir -v $HOME/dev/" +c:\cygwin64\bin\bash.exe --login -c "mkdir -pv $HOME/dev/" c:\cygwin64\bin\bash.exe --login -c "ln -vfs `cygpath $HOMEPATH`/dev/dotfiles $HOME/dev" From 9f01f5b07b383bddffd1d393ae908a1af125ce66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:16:44 +0200 Subject: [PATCH 04/23] invoke common configure script from the windows build --- windows_cygwin/build.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index eb5006c5..95b8f39e 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -4,4 +4,5 @@ REM cygwin installation 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 c:\cygwin64\bin\bash.exe --login -c "mkdir -pv $HOME/dev/" c:\cygwin64\bin\bash.exe --login -c "ln -vfs `cygpath $HOMEPATH`/dev/dotfiles $HOME/dev" +c:\cygwin64\bin\bash.exe --login -c "DIR=$HOME/dev/dotfiles $DIR/common/configure_fresh_system" From c074ea7b003ba76c6b7ab89dadabdabd280371e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:24:10 +0200 Subject: [PATCH 05/23] do not link in the repo from windows under cygwin, clone a new one --- windows_cygwin/build.bat | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index 95b8f39e..fc711368 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -1,8 +1,11 @@ -choco install -y firefox googlechrome wget -wget -c https://cygwin.com/setup-x86_64.exe -REM cygwin installation -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 -c:\cygwin64\bin\bash.exe --login -c "mkdir -pv $HOME/dev/" -c:\cygwin64\bin\bash.exe --login -c "ln -vfs `cygpath $HOMEPATH`/dev/dotfiles $HOME/dev" -c:\cygwin64\bin\bash.exe --login -c "DIR=$HOME/dev/dotfiles $DIR/common/configure_fresh_system" +choco install -y firefox googlechrome wget notepadplusplus + +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 + +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" + +c:\cygwin64\bin\bash.exe --login -c "export DIR=$HOME/dev/dotfiles && bash $DIR/common/configure_fresh_system" From e4ecedd64f0e1216a5c36d76aa8dc9b57c4de40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:30:37 +0200 Subject: [PATCH 06/23] tell git explicitely where to clone the inner repo --- windows_cygwin/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index fc711368..f0d2adda 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -5,7 +5,7 @@ setup-x86_64.exe -R "C:\cygwin64" -s http://cygwin.netbet.org/ -q -g -P curl,zsh 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" +c:\cygwin64\bin\bash.exe --login -c "git clone git@github.com:cyplo/dotfiles.git dev/dotfiles" c:\cygwin64\bin\bash.exe --login -c "export DIR=$HOME/dev/dotfiles && bash $DIR/common/configure_fresh_system" From ca11a4a09c7ff5e4419ae1dbfadfa364e225bc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:39:07 +0200 Subject: [PATCH 07/23] introduce NOSUDO in configure scripts --- common/configure_fresh_system | 19 ++++++++++++------- windows_cygwin/build.bat | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 4ddb709a..18dc8e4e 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -1,9 +1,14 @@ #!/bin/bash +SUDO="" +if [[ -z $NOSUDO ]]; then + SUDO=sudo +fi + set -e echo echo "configuring settings common among OSes" -sudo true +$SUDO true #zsh if [[ -z $DONT_CHANGE_SHELL ]]; then @@ -50,7 +55,7 @@ source ~/.setenv # symlink 'nodejs' as node on some systems # will replace symlink if it exists, but won't replace regular file if [[ ! -f /usr/bin/node ]]; then - sudo ln -vfs /usr/bin/nodejs /usr/bin/node + $SUDO ln -vfs /usr/bin/nodejs /usr/bin/node fi # tools @@ -66,7 +71,7 @@ mkdir -p ~/.fonts cp -rv "$DIR/fonts" ~/.fonts set +e fc-cache -rv -sudo fc-cache -rv +$SUDO fc-cache -rv set -e #rust @@ -105,12 +110,12 @@ mkdir -p "$GOPATH" go get -u github.com/exercism/cli/exercism # talks: reveal-md -sudo npm install -g reveal-md -sudo npm install -g diff-so-fancy +$SUDO npm install -g reveal-md +$SUDO npm install -g diff-so-fancy # vdir syncer echo "installing vdirsyncer" -sudo pip install vdirsyncer +$SUDO pip install vdirsyncer if [[ -z $USER ]]; then USER=`whoami` @@ -118,7 +123,7 @@ fi # normalize npm permissions mkdir -p $HOME/.npm -sudo chown $USER $HOME/.npm -R +$SUDO chown $USER $HOME/.npm -R echo echo "now go ahead and restart" diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index f0d2adda..b29d198f 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -7,5 +7,5 @@ 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" -c:\cygwin64\bin\bash.exe --login -c "export DIR=$HOME/dev/dotfiles && bash $DIR/common/configure_fresh_system" +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" From fc926aa798536549cf387eab6c7d0bfd728e440f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:42:34 +0200 Subject: [PATCH 08/23] add logging around sudo decision --- common/configure_fresh_system | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 18dc8e4e..2173da42 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -2,9 +2,11 @@ SUDO="" if [[ -z $NOSUDO ]]; then - SUDO=sudo + SUDO="sudo" fi +echo "using '$SUDO' as sudo" + set -e echo echo "configuring settings common among OSes" From ff3140cba6862eee2d58ddad798d9c74691acaac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sat, 30 Jul 2016 21:51:11 +0200 Subject: [PATCH 09/23] add missing rustup depndencies on cygwin --- windows_cygwin/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index b29d198f..b82bf2d4 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -1,7 +1,7 @@ choco install -y firefox googlechrome wget notepadplusplus 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 +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/" 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 10/23] 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" From 823d487950af4992a5811bcdf49de13b6872bc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sun, 31 Jul 2016 09:26:15 +0200 Subject: [PATCH 11/23] always fetch from scratch on windows --- windows_cygwin/build.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index 4a3bbd6b..fc81ad80 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -8,8 +8,9 @@ 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% "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 checkout $branch" %bash% "export DIR=$HOME/dev/dotfiles && export NOSUDO=true && export DONT_CHANGE_SHELL=true && bash $DIR/common/configure_fresh_system" From 017e7ac5c0fdab6700018dc87462465c7aebcad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sun, 31 Jul 2016 09:43:37 +0200 Subject: [PATCH 12/23] add NORUST option, use it under cygwin --- common/configure_fresh_system | 47 +++++++++++++++++++---------------- windows_cygwin/build.bat | 4 ++- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 2173da42..8fec1245 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -76,33 +76,38 @@ fc-cache -rv $SUDO fc-cache -rv set -e -#rust -echo "installing rust" -RUSTUP_TEMP="/tmp/blastoff.sh" -$CURL https://sh.rustup.rs > "$RUSTUP_TEMP" -chmod a+x "$RUSTUP_TEMP" -"$RUSTUP_TEMP" -y -rm -f "$RUSTUP_TEMP" -rustup update -rustup default stable -export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib -cd "$DIR/../" -echo "getting rust sources..." -if [[ ! -d rust ]]; then - git clone https://github.com/rust-lang/rust.git --recursive -else - cd rust - git pull - git submodule update --init --recursive +if [[ -z $NORUST ]]; then + #rust + echo "installing rust" + RUSTUP_TEMP="/tmp/blastoff.sh" + $CURL https://sh.rustup.rs > "$RUSTUP_TEMP" + chmod a+x "$RUSTUP_TEMP" + "$RUSTUP_TEMP" -y + rm -f "$RUSTUP_TEMP" + rustup update + rustup default stable + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib + cd "$DIR/../" + echo "getting rust sources..." + if [[ ! -d rust ]]; then + git clone https://github.com/rust-lang/rust.git --recursive + else + cd rust + git pull + git submodule update --init --recursive + fi + cargo install -f rustfmt fi -cargo install -f rustfmt - echo "\n" | vim +PluginInstall +qa cd "$DIR/.vim/bundle/YouCompleteMe/" git submodule update --init --recursive -./install.py --racer-completer --clang-completer +if [[ -z $NORUST ]]; then + ./install.py --racer-completer --clang-completer +else + ./install.py --clang-completer +fi # go export GOPATH="$HOME/go" diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index fc81ad80..9e88f2b3 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -12,6 +12,8 @@ for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev %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% "export DIR=$HOME/dev/dotfiles && export NOSUDO=true && export DONT_CHANGE_SHELL=true && bash $DIR/common/configure_fresh_system" +%bash% "cd $HOME/dev/dotfiles && git pull" +%bash% "DIR=$HOME/dev/dotfiles NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system" From e81b51db27e41a6bbed4dc140b9cbc6f15983953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sun, 31 Jul 2016 09:45:05 +0200 Subject: [PATCH 13/23] use export in the one-liner to launch common script under cygwin --- windows_cygwin/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index 9e88f2b3..b5be8569 100644 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -15,5 +15,5 @@ for /f "delims=" %%A in ('%bash% "cd `cygpath $HOMEPATH`/dev/dotfiles && git rev %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% "DIR=$HOME/dev/dotfiles NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system" +%bash% "export DIR=$HOME/dev/dotfiles && NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system" From fa0fa39cdf52e2b97c06120c4b41427e896e8764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Sun, 31 Jul 2016 09:52:11 +0200 Subject: [PATCH 14/23] add appveyor build status badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f30d716e..b26546c8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://travis-ci.org/cyplo/dotfiles.svg?branch=master)](https://travis-ci.org/cyplo/dotfiles) +[![Build status](https://ci.appveyor.com/api/projects/status/s6i314lyti4o1ny1/branch/master?svg=true)](https://ci.appveyor.com/project/cyplo/dotfiles/branch/master) My common dotfiles for Linux, Mac and Cygwin From ab7046d8b92a8acf5f9ec4a9e45ebde070e6ce02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Thu, 4 Aug 2016 11:21:31 +0200 Subject: [PATCH 15/23] separated the insider script for in-cygwin execution --- windows_cygwin/build.bat | 13 ++++--------- windows_cygwin/build_insider.sh | 13 +++++++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) mode change 100644 => 100755 windows_cygwin/build.bat create mode 100755 windows_cygwin/build_insider.sh 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" + From 9a706ac31248ff8b19c30ec6923e8abbbffd03aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Thu, 4 Aug 2016 11:29:27 +0200 Subject: [PATCH 16/23] do not force pull for the repo inside cygwin --- windows_cygwin/build_insider.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/windows_cygwin/build_insider.sh b/windows_cygwin/build_insider.sh index 6987aae9..7628d19f 100755 --- a/windows_cygwin/build_insider.sh +++ b/windows_cygwin/build_insider.sh @@ -8,6 +8,5 @@ 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" From ccd03d201bb829fac3815f9afe9f09d616f06139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Thu, 4 Aug 2016 11:35:31 +0200 Subject: [PATCH 17/23] fix typo in the cygwin build insider script --- windows_cygwin/build_insider.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_cygwin/build_insider.sh b/windows_cygwin/build_insider.sh index 7628d19f..af848088 100755 --- a/windows_cygwin/build_insider.sh +++ b/windows_cygwin/build_insider.sh @@ -8,5 +8,5 @@ git clone "$OUTER_CLONE" "$DOTFILES_PATH" cd "$DOTFILES_PATH" git remote set-url origin git@github.com:cyplo/dotfiles.git git checkout $branch -export DIR=$DOTFILES_PATH && NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system" +export DIR=$DOTFILES_PATH && NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system From bb2c2ed44a44a87b60add3962b69ac6a53ed1856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Thu, 4 Aug 2016 12:50:30 +0200 Subject: [PATCH 18/23] added clang to cygwin --- windows_cygwin/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_cygwin/build.bat b/windows_cygwin/build.bat index 5e57d0c8..b199bca1 100755 --- a/windows_cygwin/build.bat +++ b/windows_cygwin/build.bat @@ -2,7 +2,7 @@ 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 +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,clang set script_path=%~dp0 set repo_path=%script_path%\..\ From 1f8566dba5d7bb66d8621d9770698b6fece95ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Fri, 5 Aug 2016 09:56:31 +0200 Subject: [PATCH 19/23] Do not use vim under cygwin --- common/configure_fresh_system | 4 +++- windows_cygwin/build_insider.sh | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 91a862df..8fa2cf4b 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -99,7 +99,9 @@ if [[ -z $NORUST ]]; then cargo install -f rustfmt fi -echo "\n" | vim +PluginInstall +qa +if [[ -z $NOVIM ]]; then + echo "\n" | vim +PluginInstall +qa +fi cd "$DIR/.vim/bundle/YouCompleteMe/" git submodule update --init --recursive diff --git a/windows_cygwin/build_insider.sh b/windows_cygwin/build_insider.sh index af848088..ea349deb 100755 --- a/windows_cygwin/build_insider.sh +++ b/windows_cygwin/build_insider.sh @@ -8,5 +8,12 @@ git clone "$OUTER_CLONE" "$DOTFILES_PATH" cd "$DOTFILES_PATH" git remote set-url origin git@github.com:cyplo/dotfiles.git git checkout $branch -export DIR=$DOTFILES_PATH && NOSUDO=true DONT_CHANGE_SHELL=true NORUST=true $DIR/common/configure_fresh_system + +export NOSUDO=true +export DONT_CHANGE_SHELL=true +export NORUST=true +export NOVIM=true +export DIR=$DOTFILES_PATH + +$DIR/common/configure_fresh_system From c57fe3a92af5d8dd0ff48011b51356d55a7db9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Fri, 5 Aug 2016 10:04:58 +0200 Subject: [PATCH 20/23] Do not invoke YCM when no vim --- common/configure_fresh_system | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 8fa2cf4b..c79dd2d1 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -101,14 +101,13 @@ fi if [[ -z $NOVIM ]]; then echo "\n" | vim +PluginInstall +qa -fi - -cd "$DIR/.vim/bundle/YouCompleteMe/" -git submodule update --init --recursive -if [[ -z $NORUST ]]; then - ./install.py --racer-completer --clang-completer -else - ./install.py --clang-completer + cd "$DIR/.vim/bundle/YouCompleteMe/" + git submodule update --init --recursive + if [[ -z $NORUST ]]; then + ./install.py --racer-completer --clang-completer + else + ./install.py --clang-completer + fi fi if [[ -z $NO_GO ]]; then From 14851ba8bc68fd941a0709544164ec169d754d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Fri, 5 Aug 2016 10:14:23 +0200 Subject: [PATCH 21/23] no Go under cygwin --- windows_cygwin/build_insider.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/windows_cygwin/build_insider.sh b/windows_cygwin/build_insider.sh index ea349deb..e1eff607 100755 --- a/windows_cygwin/build_insider.sh +++ b/windows_cygwin/build_insider.sh @@ -13,6 +13,7 @@ export NOSUDO=true export DONT_CHANGE_SHELL=true export NORUST=true export NOVIM=true +export NO_GO=true export DIR=$DOTFILES_PATH $DIR/common/configure_fresh_system From ec8de1dd6acfc7235ab64810e75b9f9bc5972f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Fri, 5 Aug 2016 10:27:31 +0200 Subject: [PATCH 22/23] install python-pip manually on cygwin --- windows_cygwin/build_insider.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/windows_cygwin/build_insider.sh b/windows_cygwin/build_insider.sh index e1eff607..67e2ac84 100755 --- a/windows_cygwin/build_insider.sh +++ b/windows_cygwin/build_insider.sh @@ -16,5 +16,8 @@ export NOVIM=true export NO_GO=true export DIR=$DOTFILES_PATH +curl https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py +python /tmp/get-pip.py + $DIR/common/configure_fresh_system From 802da05398599d265df59c9b906da59661fc1020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Fri, 5 Aug 2016 10:56:39 +0200 Subject: [PATCH 23/23] always proper line ending for sh scripts --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index 486a2325..a647db34 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,3 @@ +*.sh -crlf + *.zip filter=lfs diff=lfs merge=lfs -text