mirror of
https://github.com/ilyakooo0/nix-bundle.git
synced 2024-09-11 06:55:53 +03:00
nix-bundle.sh: Fix a bug where the wrong nix build out-link was read
This commit is contained in:
parent
138ff3a395
commit
8a7793bf7a
@ -115,18 +115,21 @@ extra_target_paths=
|
||||
for target in "${targets[@]}"
|
||||
do
|
||||
nix build "${build_flags[@]}" "$target" || exit $?
|
||||
out_link="$linkdir/$(ls "$linkdir")"
|
||||
if [ -z "$target_path" ]
|
||||
then
|
||||
target_path="$(readlink "$linkdir/result")"
|
||||
target_path="$(readlink "$out_link")"
|
||||
else
|
||||
extra_target_paths="$extra_target_paths $(readlink "$linkdir/result")"
|
||||
extra_target_paths="$extra_target_paths $(readlink "$out_link")"
|
||||
fi
|
||||
rm "$out_link"
|
||||
done
|
||||
|
||||
if [ -z "$target_path" ]
|
||||
then
|
||||
nix build "${build_flags[@]}" || exit $?
|
||||
target_path="$(readlink "$linkdir/result")"
|
||||
out_link="$(ls "$linkdir")"
|
||||
target_path="$(readlink "$out_link")"
|
||||
fi
|
||||
|
||||
# Apply default for --bin
|
||||
|
Loading…
Reference in New Issue
Block a user