From 6f97ed78ab478f7502ea078f1d9be5f06ebfebf7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 6 Jan 2022 08:51:50 +0100 Subject: ... --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 98760a6..6a46fa0 100644 --- a/flake.nix +++ b/flake.nix @@ -126,7 +126,7 @@ set -ex function unpackPhase() { - ${pkgs.rsync}/bin/rsync --chmod=u+wX -rlptD --exclude /tmp --exclude /build_dir --exclude /bin ${openwrtWithPackages}/. ${./files}/. ./. + ${pkgs.rsync}/bin/rsync --chmod=u+wX -rlptD --exclude /tmp --exclude /build_dir --exclude /bin --exclude /staging_dir ${openwrtWithPackages}/. ${./files}/. ./. patchDir=$(mktemp -d -t patches.XXXXXXXXXX) ${pkgs.rsync}/bin/rsync --chmod=u+wX -rlptD ${./patches}/. "$patchDir/." @@ -134,9 +134,9 @@ while IFS= read -r -d $'\0' sopsFile; do ${pkgs.sops}/bin/sops --output="''${sopsFile%.sops}" --decrypt "''${sopsFile}" rm "''${sopsFile}" - done < <(find ./. "$patchDir" -not \( \( -path ./tmp -a -prune \) -o \( -path ./build_dir -a -prune \) -o \( -path ./bin -a -prune \) -o \( -path ./staging_dir -a -prune \) \) -a \( -type f -a -name '*.sops' -a -print0 \)) + done < <(find . "$patchDir" -not \( \( -path ./tmp -o -path ./build_dir -o -path ./bin -o -path ./staging_dir \) -a -prune \) -a \( -type f -a -name '*.sops' -a -print0 \)) - while IFS= read -r -d $'\0' patchFile; do + while IFS= read -r -d $'\0' patchFile; do. patch -p1 --batch <$patchFile done < <(find "$patchDir" -type f -name '*.patch' -print0) } -- cgit v1.2.3