From 48fe43e00c91575208bb9282d70c4d719043e821 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 7 Jun 2016 04:53:47 +0000 Subject: Makefile.in: cd to working directory * Makefile.in (update-{mspec,rubyspec,doclie,simplecov{,-html}}): cd to working directory first and check if the directory exists. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- Makefile.in | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index 60fb44fd90..2a4d0c46f9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -476,10 +476,9 @@ after-update:: common-srcs update-mspec: @$(CHDIR) $(srcdir); \ - if [ -d spec/mspec ]; then \ + if cd spec/mspec 2> $(NULL); then \ echo updating mspec ...; \ $(Q1:0=:) set -x; \ - cd spec/mspec && \ exec git pull; \ else \ echo retrieving mspec ...; \ @@ -490,10 +489,9 @@ update-mspec: update-rubyspec: update-mspec @$(CHDIR) $(srcdir); \ - if [ -d spec/rubyspec ]; then \ + if cd spec/rubyspec 2> $(NULL); then \ echo updating rubyspec ...; \ $(Q1:0=:) set -x; \ - cd spec/rubyspec && \ exec git pull; \ else \ echo retrieving rubyspec ...; \ @@ -503,14 +501,14 @@ update-rubyspec: update-mspec $(Q)cd $(srcdir)/spec/rubyspec && exec git --no-pager log -1 --oneline test-rubyspec-precheck: - @if [ ! -d $(srcdir)/spec/rubyspec ]; then echo No rubyspec here. make update-rubyspec first.; exit 1; fi + @[ -d $(srcdir)/spec/rubyspec ] || \ + { echo No rubyspec here. make update-rubyspec first.; exit 1; } update-doclie: @$(CHDIR) $(srcdir); \ - if [ -d coverage/doclie ]; then \ + if cd coverage/doclie 2> $(NULL); then \ echo updating doclie ...; \ $(Q1:0=:) set -x; \ - cd coverage/doclie && \ git fetch && \ exec git checkout $(DOCLIE_GIT_REF); \ else \ @@ -521,10 +519,9 @@ update-doclie: update-simplecov-html: @$(CHDIR) $(srcdir); \ - if [ -d coverage/simplecov-html ]; then \ + if cd coverage/simplecov-html 2> $(NULL) then \ echo updating simplecov-html ...; \ $(Q1:0=:) set -x; \ - cd coverage/simplecov-html && \ git fetch && \ exec git checkout $(SIMPLECOV_HTML_GIT_REF); \ else \ @@ -534,10 +531,9 @@ update-simplecov-html: update-simplecov: @$(CHDIR) $(srcdir); \ - if [ -d coverage/simplecov ]; then \ + if cd coverage/simplecov 2> $(NULL); then \ echo updating simplecov ...; \ $(Q1:0=:) set -x; \ - cd coverage/simplecov && \ git fetch && \ exec git checkout $(SIMPLECOV_GIT_REF); \ else \ -- cgit v1.2.3