mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 21:21:06 +00:00
Merge pull request #17596 from ttuegel/stage-1
nixos/stage-1: use `readlink -e` in builder
This commit is contained in:
commit
d609df13dd
|
@ -87,15 +87,11 @@ let
|
|||
LDD="$(ldd $BIN)" || continue
|
||||
LIBS="$(echo "$LDD" | awk '{print $3}' | sed '/^$/d')"
|
||||
for LIB in $LIBS; do
|
||||
[ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib
|
||||
while [ "$(readlink $LIB)" != "" ]; do
|
||||
LINK="$(readlink $LIB)"
|
||||
if [ "''${LINK:0:1}" != "/" ]; then
|
||||
LINK="$(dirname $LIB)/$LINK"
|
||||
fi
|
||||
LIB="$LINK"
|
||||
[ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib
|
||||
done
|
||||
TGT="$out/lib/$(basename $LIB)"
|
||||
if [ ! -f "$TGT" ]; then
|
||||
SRC="$(readlink -e $LIB)"
|
||||
cp -pdv "$SRC" "$TGT"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue