From d25fc88230dae6bc8923d85b15fc7b06a03bb833 Mon Sep 17 00:00:00 2001 From: dmotte <37443982+dmotte@users.noreply.github.com> Date: Thu, 22 Aug 2024 02:09:55 +0200 Subject: [PATCH] Explicit cp target flags --- examples/git-e2ee-rclone/README.md | 2 +- examples/mdwiki/README.md | 2 +- scripts/cicd/mkdocs-ghpages.sh | 2 +- scripts/cicd/rust-app.sh | 2 +- snippets/README.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/git-e2ee-rclone/README.md b/examples/git-e2ee-rclone/README.md index 3b06ca6..c9f16dc 100644 --- a/examples/git-e2ee-rclone/README.md +++ b/examples/git-e2ee-rclone/README.md @@ -18,7 +18,7 @@ Create a new empty **bare Git repo** locally, and enable and run the **`post-upd ```bash git init --bare repo01.git -(cd repo01.git/hooks && cp post-update{.sample,} && ./post-update) +(cd repo01.git/hooks && cp -T post-update{.sample,} && ./post-update) ``` Now upload your new blank Git bare repo onto the `mycrypt` remote: diff --git a/examples/mdwiki/README.md b/examples/mdwiki/README.md index 74a4da0..294e2a8 100644 --- a/examples/mdwiki/README.md +++ b/examples/mdwiki/README.md @@ -8,7 +8,7 @@ These are the commands I use to set it up in a local folder: curl -fLO 'https://github.com/Dynalon/mdwiki/releases/download/0.6.2/mdwiki-0.6.2.zip' echo e06f5d99c5cf3a85abdd522a6f2e9a1a9cb669468b29ee970caff3020ba9190a mdwiki-0.6.2.zip | sha256sum -c unzip mdwiki-0.6.2.zip -cp mdwiki-0.6.2/mdwiki.html index.html +cp -T mdwiki-0.6.2/mdwiki.html index.html sed -i 's/index\.md/README.md/g' index.html ``` diff --git a/scripts/cicd/mkdocs-ghpages.sh b/scripts/cicd/mkdocs-ghpages.sh index d8c1aeb..4b0205c 100644 --- a/scripts/cicd/mkdocs-ghpages.sh +++ b/scripts/cicd/mkdocs-ghpages.sh @@ -105,7 +105,7 @@ echo "::group::$0: Build" find "$real_src" -mindepth 1 -maxdepth 1 "${args_excludes[@]}" | while read -r i; do echo "Copying $i into $real_dst" - cp -R "$i" "$real_dst" + cp -Rt"$real_dst" "$i" done fi diff --git a/scripts/cicd/rust-app.sh b/scripts/cicd/rust-app.sh index 7afe986..903217c 100644 --- a/scripts/cicd/rust-app.sh +++ b/scripts/cicd/rust-app.sh @@ -131,7 +131,7 @@ echo "::group::$0: Artifact" dst=cicd-artifact/$file_basename echo "Copying $src to $dst" - cp "$src" "$dst" + cp -T "$src" "$dst" echo "- 📦 Artifact file: \`$file_basename\`" | tee -a "$CICD_SUMMARY" done diff --git a/snippets/README.md b/snippets/README.md index be5df0e..4fe6c02 100644 --- a/snippets/README.md +++ b/snippets/README.md @@ -36,7 +36,7 @@ Some pieces of code I find useful for some reason. - `rclone lsf -R --format=pst myremote: | LC_ALL=C sort` - `tree -paugh` - `find | grep -i pattern` -- `cp -Rv /media/sourcedisk/folder /media/destdisk` +- `cp -Rvt/media/destdisk /media/sourcedisk/folder` - `ss -tulpn` - `df -h` - `du -sh`