From 455ad390421bdf3056f372a2b404de82a1accc70 Mon Sep 17 00:00:00 2001 From: Leandro Emmanuel Reina Kiperman Date: Fri, 29 Apr 2022 19:25:29 +0200 Subject: [PATCH] Fix binary find --- shell.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index f43fd7d..9a0e162 100644 --- a/shell.nix +++ b/shell.nix @@ -379,7 +379,7 @@ pkgs.mkShell { '# \033[3mExtract HEX file\033[0m ------------------------------------------------------------------------------------ #\n' ; ( '${coreutils}/bin/mkdir' -p "''${_ROOT_DIR}/.build" && - '${coreutils}/bin/ls' "''${_ROOT_DIR}/QMK/.build"/*.hex "''${_ROOT_DIR}/QMK/.build"/*.bin | + '${findutils}/bin/find' "''${_ROOT_DIR}/QMK/.build" -type f -regextype awk -iregex '^.*\.(hex|bin)$' | '${coreutils}/bin/head' -1 | '${findutils}/bin/xargs' -i cp -f -- '{}' "''${_ROOT_DIR}/.build/firmware.hex" && '${coreutils}/bin/printf' 'Extracted .build/firmware.hex\n' ;