lix/corepkgs/channels/unpack.sh.in

23 lines
349 B
Bash
Raw Normal View History

#! @shell@ -e
2005-03-15 12:03:15 +00:00
@coreutils@/mkdir $out
@coreutils@/mkdir $out/tmp
cd $out/tmp
expr=$out/default.nix
echo '[' > $expr
nr=0
for i in $inputs; do
echo "unpacking $i"
2005-03-15 12:03:15 +00:00
@bunzip2@ < $i | @tar@ xvf -
@coreutils@/mv * ../$nr # !!! hacky
echo "(import ./$nr)" >> $expr
nr=$(($nr + 1))
done
echo ']' >> $expr
cd ..
2005-03-15 12:03:15 +00:00
@coreutils@/rmdir tmp