From 089f936bfadcdbc8dd53e545a21f1afd4eb0e379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondrej=20Mosn=C3=A1=C4=8Dek?= Date: Tue, 5 Sep 2023 13:32:34 +0200 Subject: [PATCH] Use install instead of mkdir and cp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also remove redundant cp invocations. Signed-off-by: Ondrej Mosnáček --- cloud-utils.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cloud-utils.spec b/cloud-utils.spec index 7ce1626..d02ea94 100644 --- a/cloud-utils.spec +++ b/cloud-utils.spec @@ -65,12 +65,12 @@ package to grow the root partition on first boot. %install # Create the target directories -mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_mandir}/man1 +install -d %{buildroot}%{_bindir} +install -d %{buildroot}%{_mandir}/man1 # Install binaries and manpages -cp bin/* %{buildroot}%{_bindir}/ -cp man/* %{buildroot}%{_mandir}/man1/ +install -pm 0755 bin/* %{buildroot}%{_bindir}/ +install -pm 0644 man/* %{buildroot}%{_mandir}/man1/ # Exclude Ubuntu-specific tools rm %{buildroot}%{_bindir}/*ubuntu* @@ -82,10 +82,6 @@ rm -f %{buildroot}%{_mandir}/man1/cloud-run-instances.* rm -f %{buildroot}%{_bindir}/cloud-publish-* rm -f %{buildroot}%{_mandir}/man1/cloud-publish-* -# Install the growpart binary and man page -cp bin/growpart %{buildroot}%{_bindir}/ -cp man/growpart.* %{buildroot}%{_mandir}/man1/ - # Files for the main package %files