[mm-common] util/meson_aux: Use short options for the cp command.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mm-common] util/meson_aux: Use short options for the cp command.
- Date: Tue, 20 Aug 2019 10:06:55 +0000 (UTC)
commit 8ee3e238a9628a5abfb2a3e52e5dc243a112a815
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Aug 20 10:32:14 2019 +0200
util/meson_aux: Use short options for the cp command.
Posix does not support long options for the cp command.
See !1
util/meson_aux/extra-dist-cmd.sh | 7 ++++---
util/meson_aux/libstdcxx-tag.sh | 4 +++-
util/meson_aux/skeletonmm-tarball.sh | 5 ++---
3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/util/meson_aux/extra-dist-cmd.sh b/util/meson_aux/extra-dist-cmd.sh
index df65e2f..186d7e4 100755
--- a/util/meson_aux/extra-dist-cmd.sh
+++ b/util/meson_aux/extra-dist-cmd.sh
@@ -4,7 +4,7 @@
# extra-dist-cmd.sh <root_source_dir> <root_build_dir> <relative_dist_dir>
-# relative_dist_dir is the distribution directory path relative to root_build_dir.
+# <relative_dist_dir> is the distribution directory path relative to <root_build_dir>.
# Meson does not preserve timestamps on distributed files.
# But this script preserves the timestamps on libstdc++.tag.
@@ -13,5 +13,6 @@ git --git-dir="$1/.git" --work-tree="$1" log --no-merges --date=short --max-coun
--pretty='tformat:%cd %an <%ae>%n%n %s%n%w(0,0,2)%+b' > "$2/$3/ChangeLog"
# Distribute the libstdc++.tag file in addition to the files in the local git clone.
-cd "$2"
-cp --preserve=timestamps "libstdc++.tag" "$3/doctags/"
+# -p == --preserve=mode,ownership,timestamps (Posix does not support long options.)
+# Only the preservation of timestamps is essential here.
+cp -p "$2/libstdc++.tag" "$2/$3/doctags/"
diff --git a/util/meson_aux/libstdcxx-tag.sh b/util/meson_aux/libstdcxx-tag.sh
index 300ea09..c05d8e8 100755
--- a/util/meson_aux/libstdcxx-tag.sh
+++ b/util/meson_aux/libstdcxx-tag.sh
@@ -32,7 +32,9 @@ case "$1" in
echo "Warning: $3 does not exist."
echo "Copying from the source directory because network is disabled."
echo "If you want an up-to-date copy, reconfigure with the -Duse-network=true option."
- cp --preserve=timestamps "$2/$output_filename" "$3"
+ # -p == --preserve=mode,ownership,timestamps (Posix does not support long options.)
+ # Only the preservation of timestamps is essential here.
+ cp -p "$2/$output_filename" "$3"
else
echo "Error: $3 does not exist." >&2
echo "Downloading it is not possible because network is disabled." >&2
diff --git a/util/meson_aux/skeletonmm-tarball.sh b/util/meson_aux/skeletonmm-tarball.sh
index ff50bc5..f0fd17d 100755
--- a/util/meson_aux/skeletonmm-tarball.sh
+++ b/util/meson_aux/skeletonmm-tarball.sh
@@ -6,10 +6,9 @@
source_dir="$1"
output_file="$2"
-shift; shift
+shift 2
-# These options don't contain filenames, and thus no spaces that
-# must be preserved in the call to tar.
+# -chof == --create --dereference --old-archive --file (Posix does not support long options.)
tar_options="-chof -"
case "$output_file" in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]