mirror of
https://github.com/ilyakooo0/nix-bundle.git
synced 2024-09-11 06:55:53 +03:00
use filename instead of target for nix-bundle.sh
This commit is contained in:
parent
07e28d9384
commit
06dab776d6
@ -21,8 +21,9 @@ fi
|
||||
|
||||
target="$1"
|
||||
exec="$2"
|
||||
filename=$(basename $exec)
|
||||
|
||||
expr="with import <nixpkgs> {}; with import ./. {}; nix-bootstrap { name = \"$target\"; target = $target; run = \"$exec\"; }"
|
||||
expr="with import <nixpkgs> {}; with import ./. {}; nix-bootstrap { name = \"$filename\"; target = $target; run = \"$exec\"; }"
|
||||
|
||||
out=$(nix-store --no-gc-warning -r $(nix-instantiate --no-gc-warning -E "$expr"))
|
||||
|
||||
@ -30,6 +31,6 @@ if [ -z "$out" ]; then
|
||||
echo "$0 failed. Exiting."
|
||||
exit 1
|
||||
else
|
||||
echo "Nix bundle created at $target."
|
||||
cp -f $out $target
|
||||
echo "Nix bundle created at $filename."
|
||||
cp -f $out $filename
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user