From 10adb2d27e3005c7239585eb38dbbe3b5b01a400 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Jun 2017 03:31:14 +0200 Subject: whatsupnix: use gawk and nix-store explicitly --- krebs/5pkgs/simple/whatsupnix/whatsupnix.bash | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash b/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash index 042763048..127209570 100644 --- a/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash +++ b/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash @@ -17,15 +17,12 @@ # 2 Build error; at least one failed derivation could be found. # -GAWK=${GAWK:-gawk} -NIX_STORE=${NIX_STORE:-nix-store} - failed_drvs=$(mktemp --tmpdir whatsupnix.XXXXXXXX) trap 'rm -f -- "$failed_drvs"' EXIT exec >&2 -$GAWK -v failed_drvs="$failed_drvs" ' +gawk -v failed_drvs="$failed_drvs" ' match($0, /^builder for ‘(\/nix\/store\/[^’]+\.drv)’ failed/, m) { print m[1] >> failed_drvs } @@ -35,7 +32,7 @@ $GAWK -v failed_drvs="$failed_drvs" ' case $# in 0) print_log() { - NIX_PAGER= $NIX_STORE -l "$1" + NIX_PAGER= nix-store -l "$1" } ;; 1) -- cgit v1.2.3 From dbe4cc21e33ccc22b9dd352dd8c6913d60a0cbc0 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Jun 2017 04:53:34 +0200 Subject: pkgs.whatsupnix: print gawk output ASAP --- krebs/5pkgs/simple/whatsupnix/whatsupnix.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash b/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash index 127209570..2ad9aadc9 100644 --- a/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash +++ b/krebs/5pkgs/simple/whatsupnix/whatsupnix.bash @@ -26,7 +26,7 @@ gawk -v failed_drvs="$failed_drvs" ' match($0, /^builder for ‘(\/nix\/store\/[^’]+\.drv)’ failed/, m) { print m[1] >> failed_drvs } - { print $0 } + { print $0; fflush("/dev/stdout") } ' case $# in -- cgit v1.2.3