use filename instead of target for nix-bundle.sh
commit06dab776d6879b64c1d26d092dafe24f0fd00fd5
authorMatthew Bauer <mjbauer95@gmail.com>
dateSun 12 Feb 2017, 19:34 (10 years ago)
parent07e28d9
nix-bundle.sh+4−3
@@ -21,8 +21,9 @@ fi
2121
2222target="$1"
2323exec="$2"
24+filename=$(basename $exec)
2425
25−expr="with import <nixpkgs> {}; with import ./. {}; nix-bootstrap { name = \"$target\"; target = $target; run = \"$exec\"; }"
26+expr="with import <nixpkgs> {}; with import ./. {}; nix-bootstrap { name = \"$filename\"; target = $target; run = \"$exec\"; }"
2627
2728out=$(nix-store --no-gc-warning -r $(nix-instantiate --no-gc-warning -E "$expr"))
2829
@@ -30,6 +31,6 @@ if [ -z "$out" ]; then
3031 echo "$0 failed. Exiting."
3132 exit 1
3233else
33− echo "Nix bundle created at $target."
34− cp -f $out $target
34+ echo "Nix bundle created at $filename."
35+ cp -f $out $filename
3536fi