From 553105310a5a1a2280fc2c40773ab1cf3fdfad98 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sun, 29 Mar 2015 13:20:27 -0700 Subject: [PATCH] nixos/stage-1: Fix the initrd builder for shell scripts --- nixos/modules/system/boot/stage-1.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index ec696d838cc..0bf5a2f3c80 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -45,8 +45,7 @@ let copy_bin_and_libs () { [ -f "$out/bin/$(basename $1)" ] && return 0 cp -pdv $1 $out/bin - LDD="$(ldd $1)" - [ "$?" -eq "1" ] && return 0 + LDD="$(ldd $1)" || return 0 LIBS="$(echo "$LDD" | awk '{print $3}' | sed '/^$/d')" for LIB in $LIBS; do [ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib