about summary refs log blame commit diff
path: root/corepkgs/channels/unpack.sh.in
blob: 80c177024c555a8d0aa721dfcffea8e4ac368319 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12

             

                          







                       
                               
                                       






                                  
                     
#! @shell@ -e

@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"
    @bunzip2@ < $i | @tar@ xf -
    @coreutils@/mv * ../$nr # !!! hacky
    echo "(import ./$nr)" >> $expr
    nr=$(($nr + 1))
done

echo ']' >> $expr

cd ..
@coreutils@/rmdir tmp