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