From 6fa6a4f3ce9c054e9b33d151edc9cc4ee2785b24 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 9 Dec 2024 18:15:08 +0800 Subject: [PATCH] Use "install ... -t $dir" instead of "mkdir $dir; cp ... $dir" if possible So we don't need to type the long path twice. --- chapter08/gawk.xml | 3 +-- chapter08/iproute2.xml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chapter08/gawk.xml b/chapter08/gawk.xml index bc19acaaf..bc3717653 100644 --- a/chapter08/gawk.xml +++ b/chapter08/gawk.xml @@ -84,8 +84,7 @@ make install If desired, install the documentation: -mkdir -pv /usr/share/doc/gawk-&gawk-version; -cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version; +install -vDm644 doc/{awkforai.txt,*.{eps,pdf,jpg}} -t /usr/share/doc/gawk-&gawk-version; diff --git a/chapter08/iproute2.xml b/chapter08/iproute2.xml index 50fec36aa..bcf08858b 100644 --- a/chapter08/iproute2.xml +++ b/chapter08/iproute2.xml @@ -77,8 +77,7 @@ rm -fv man/man8/arpd.8 If desired, install the documentation: -mkdir -pv /usr/share/doc/iproute2-&iproute2-version; -cp -v COPYING README* /usr/share/doc/iproute2-&iproute2-version; +install -vDm644 COPYING README* -t /usr/share/doc/iproute2-&iproute2-version;