A new user interface for you! Read more...

File getdeps.sh of Package gx

#!/bin/sh -x
function getdeps
{
    deps=$(grep '"hash":' | cut -d\" -f4)
    mkdir -p src/gx/ipfs
    for dep in $deps ; do
        rsync -a /ipfs/$dep/ src/gx/ipfs/$dep
        d=$( cd src ; echo gx/ipfs/$dep/*)
        #echo $d
        url=$(grep '"dvcsimport"' src/$d/package.json | cut -d\" -f4)
        #echo $url
        mkdir -p src/$(dirname $url)
        dotdot=$(perl -e '$_=shift; my @x=m#/#g; print "../" x scalar @x' $url)
        ln -s $dotdot/$d src/$url
        getdeps < src/$d/package.json
    done
}

version=$(rpmspec --query --srpm --queryformat="%{version}" *.spec)
name=$(rpmspec --query --srpm --queryformat="%{name}" *.spec)
tar -xOf v$version.tar.gz $name-$version/package.json |
  getdeps

chmod -R u+w src
tar --format=ustar --sort=name --mtime=@1 --owner=root --group=root -c src |
  gzip -cn9 > $name-deps.tar.gz