diff options
| author | tv <tv@krebsco.de> | 2025-04-09 01:45:52 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2025-04-09 11:40:08 +0200 |
| commit | a28c25668a6d0f83f80e821b63cab80e4f7b05ad (patch) | |
| tree | 397bbba7dc00dbef9efbfcbd24ed6a4ab40fe310 | |
| parent | e9fa0a77e1b9afa7aa7fa6671f6cf6af2cbfa102 (diff) | |
populate passage: rename loop variables
| -rw-r--r-- | pkgs/populate/default.nix | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix index ce2a154..c12507b 100644 --- a/pkgs/populate/default.nix +++ b/pkgs/populate/default.nix @@ -189,14 +189,15 @@ let ${findutils}/bin/find "$PASSAGE_DIR" -type f -name \*.age -follow | while read -r age_path; do - rel_name=''${age_path#$PASSAGE_DIR} - rel_name=''${rel_name%.age} + pass_name=''${age_path#$PASSAGE_DIR/} + pass_name=''${pass_name%.age} - tmp_path=$tmp_dir/$rel_name + out=$tmp_dir/$pass_name - ${coreutils}/bin/mkdir -p "$(${coreutils}/bin/dirname "$tmp_path")" - ${passage}/bin/passage show "$rel_name" > "$tmp_path" - ${coreutils}/bin/touch -r "$age_path" "$tmp_path" + ${coreutils}/bin/mkdir -p "$(${coreutils}/bin/dirname "$out")" + ${passage}/bin/passage show "$pass_name" > "$out" + + ${coreutils}/bin/touch -r "$age_path" "$out" done ${rsync' target rsyncDefaultConfig /* sh */ "$tmp_dir"} |
