2003-07-18 03:42:57 -04:00
|
|
|
#! /bin/sh
|
|
|
|
|
2003-08-28 06:10:12 -04:00
|
|
|
export PATH=/bin:/usr/bin
|
|
|
|
|
2003-07-18 03:42:57 -04:00
|
|
|
echo "packing $path into $out..."
|
2003-07-21 17:34:56 -04:00
|
|
|
mkdir $out || exit 1
|
2003-10-16 09:13:39 -04:00
|
|
|
dst=$out/`basename $path`.nar.bz2
|
2003-11-22 15:39:51 -05:00
|
|
|
@bindir@/nix-store --dump "$path" | bzip2 > $dst || exit 1
|
2003-07-18 03:42:57 -04:00
|
|
|
|
2003-10-16 09:13:39 -04:00
|
|
|
md5=$(md5sum -b $dst | cut -c1-32)
|
2003-07-21 17:34:56 -04:00
|
|
|
if test $? != 0; then exit 1; fi
|
2003-10-16 09:13:39 -04:00
|
|
|
echo $md5 > $out/md5 || exit 1
|