Check for docker manpage existence in %post
The post install script should check for prior Dockerfile and dockerignore manpages on the system before creating them and not depend on the existence of /usr/bin/docker or the lack of it. Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
parent
2d5f45149b
commit
d16e5dd7d0
@ -128,11 +128,17 @@ ln -s %{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm
|
|||||||
ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/redhat.repo
|
ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/redhat.repo
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [[ ! -f %{_bindir}/docker ]]; then
|
if [[ ! -f %{_mandir}/man5/Dockerfile.5.gz ]]; then
|
||||||
echo .so %{_mandir}/man5/Containerfile.5 > %{_mandir}/man5/Dockerfile.5
|
echo .so %{_mandir}/man5/Containerfile.5 > %{_mandir}/man5/Dockerfile.5
|
||||||
echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/.dockerignore.5
|
gzip %{_mandir}/man5/Dockerfile.5
|
||||||
|
fi
|
||||||
|
if [[ ! -f %{_mandir}/man5/dockerignore.5.gz ]]; then
|
||||||
echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/dockerignore.5
|
echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/dockerignore.5
|
||||||
gzip %{_mandir}/man5/{Dockerfile,.dockerignore,dockerignore}.5
|
gzip %{_mandir}/man5/dockerignore.5
|
||||||
|
fi
|
||||||
|
if [[ ! -f %{_mandir}/man5/.dockerignore.5.gz ]]; then
|
||||||
|
echo .so %{_mandir}/man5/containerignore.5 > %{_mandir}/man5/.dockerignore.5
|
||||||
|
gzip %{_mandir}/man5/.dockerignore.5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
Loading…
Reference in New Issue
Block a user