From c09b3c1fde18c6792af922e617b48fd94f5072a4 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 9 Apr 2025 01:45:52 +0200 Subject: populate passage: rename loop variables --- pkgs/populate/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/populate/default.nix b/pkgs/populate/default.nix index b67f761..103235f 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 ${findutils}/bin/find "$tmp_dir" -type d \ -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/22300000.lock: No such file or directory (2)