From 51eedbe6b076ed495d0022b84300f7589013a96e Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Wed, 13 Dec 2023 09:14:27 -0700 Subject: [PATCH] Have final `cp` use `-a` flag over `-r` flag. (#12) * Try with cp archive. * With rm instead. * Avoid rm completely. * Pass. * Favor cp -a. --- specs/clang/runner | 2 +- specs/mix/runner | 2 +- specs/nodejs/runner | 2 +- specs/phoenix/runner | 5 +++-- specs/poetry/runner | 2 +- specs/postgres/runner | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/specs/clang/runner b/specs/clang/runner index 6a56b1c..edc5741 100755 --- a/specs/clang/runner +++ b/specs/clang/runner @@ -52,4 +52,4 @@ chmod 755 "$BUILD"/.githooks/pre-commit # ============================================================ # Success! Copy contents to target directory. -cp -r "$BUILD"/* "$OUT" +cp -a "$BUILD"/* "$OUT" diff --git a/specs/mix/runner b/specs/mix/runner index 5bd2866..b13a356 100755 --- a/specs/mix/runner +++ b/specs/mix/runner @@ -85,4 +85,4 @@ sed -i "s//$APP/g" "$BUILD/flake.nix" # ============================================================ # Success! Copy contents to target directory. -cp -r "$BUILD"/* "$OUT" +cp -a "$BUILD"/* "$OUT" diff --git a/specs/nodejs/runner b/specs/nodejs/runner index 3bfdc1c..d3ddff4 100755 --- a/specs/nodejs/runner +++ b/specs/nodejs/runner @@ -70,4 +70,4 @@ nix develop "$BUILD" --command bash -c \ # ============================================================ # Success! Copy contents to target directory. -cp -r "$BUILD"/!(bs.nodejs) "$OUT" +cp -a "$BUILD"/!(bs.nodejs) "$OUT" diff --git a/specs/phoenix/runner b/specs/phoenix/runner index d18e5af..d0a0de8 100755 --- a/specs/phoenix/runner +++ b/specs/phoenix/runner @@ -73,7 +73,8 @@ chmod 644 "$BUILD"/README.md # Include additional build files for our assets. Group into subdirectory so # the `chmod` command can take advantage of globbing. -cp -r assets "$BUILD"/bs.assets +mkdir -p "$BUILD"/bs.assets +cp assets/* "$BUILD"/bs.assets chmod 644 "$BUILD"/bs.assets/* mv "$BUILD"/bs.assets/* "$BUILD"/assets rmdir "$BUILD"/bs.assets @@ -128,4 +129,4 @@ EOF # ============================================================ # Success! Copy contents to target directory. -cp -r "$BUILD"/* "$OUT" +cp -a "$BUILD"/* "$OUT" diff --git a/specs/poetry/runner b/specs/poetry/runner index cc0191c..2418c5a 100755 --- a/specs/poetry/runner +++ b/specs/poetry/runner @@ -52,4 +52,4 @@ chmod 755 "$BUILD"/.githooks/pre-commit # ============================================================ # Success! Copy contents to target directory. -cp -r "$BUILD"/* "$OUT" +cp -a "$BUILD"/* "$OUT" diff --git a/specs/postgres/runner b/specs/postgres/runner index 70145fc..a191931 100755 --- a/specs/postgres/runner +++ b/specs/postgres/runner @@ -53,4 +53,4 @@ find "$BUILD" -type f -execdir chmod 644 {} + # ============================================================ # Success! Copy contents to target directory. -cp -r "$BUILD"/* "$OUT" +cp -a "$BUILD"/* "$OUT"