Fix error when gems/src is read-only

When I shared srcdir as read-only in lima-vm,
`make install` causes following error:

```
Update rbs to 33813a60752624d58dfe5ae770b39bfaf29fbaf1
error: cannot open .git/FETCH_HEAD: Read-only file system
```

I cannot find any ignore option for `git checkout --detach`
when already checked out. So I add `if`.
This commit is contained in:
Kazuhiro NISHIYAMA 2023-10-11 11:38:04 +09:00 коммит произвёл Kazuhiro NISHIYAMA
Родитель a84d0945fa
Коммит 0fb10074e1
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -371,9 +371,11 @@ $(bundled-gem-revision): \
| $(srcdir)/.bundle/.timestamp $(srcdir)/gems/src/$(1)/.git
$(ECHO) Update $(1) to $(3)
$(Q) $(CHDIR) "$(srcdir)/gems/src/$(1)" && \
if [ `$(GIT) rev-parse HEAD` != $(3) ]; then \
$(GIT) fetch origin $(3) && \
$(GIT) checkout --detach $(3) && \
:
:; \
fi
echo $(3) | $(IFCHANGE) $$(@) -
# The repository of minitest does not include minitest.gemspec because it uses hoe.