summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2019-08-20 10:32:14 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2019-08-20 10:32:14 +0200
commit8ee3e238a9628a5abfb2a3e52e5dc243a112a815 (patch)
tree733197ca51c9387b132f78897d1c34770cf8c29e
parentbca3cb716cc92ad79e58d3f54e188f84920d789a (diff)
downloadmm-common-8ee3e238a9628a5abfb2a3e52e5dc243a112a815.tar.gz
util/meson_aux: Use short options for the cp command.
Posix does not support long options for the cp command. See !1
-rwxr-xr-xutil/meson_aux/extra-dist-cmd.sh7
-rwxr-xr-xutil/meson_aux/libstdcxx-tag.sh4
-rwxr-xr-xutil/meson_aux/skeletonmm-tarball.sh5
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