diff options
Diffstat (limited to 'corepkgs')
-rw-r--r-- | corepkgs/nar/nar.sh.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/corepkgs/nar/nar.sh.in b/corepkgs/nar/nar.sh.in index 9f96b03ab314..c92ef8e25a8d 100644 --- a/corepkgs/nar/nar.sh.in +++ b/corepkgs/nar/nar.sh.in @@ -4,9 +4,9 @@ export PATH=/bin:/usr/bin echo "packing $path into $out..." mkdir $out || exit 1 -tmp=$out/tmp -@bindir@/nix --dump --path "$path" | bzip2 > $out/tmp || exit 1 +dst=$out/`basename $path`.nar.bz2 +@bindir@/nix --dump "$path" | bzip2 > $dst || exit 1 -md5=$(md5sum -b $tmp | cut -c1-32) +md5=$(md5sum -b $dst | cut -c1-32) if test $? != 0; then exit 1; fi -mv $out/tmp $out/$md5-`basename $path`.nar.bz2 || exit 1 +echo $md5 > $out/md5 || exit 1 |