#!/bin/sh

version=$(rpm -q --specfile --qf='%{version}\n' ~/rpmbuild/SPECS/nodejs-yarn.spec | head -n1)
wget https://github.com/yarnpkg/yarn/archive/v$version.tar.gz
tar -zxf v$version.tar.gz
cd yarn-$version
npm install && cd .. && tar -zcf ~/rpmbuild/SOURCES/yarn-v$version-bundled.tar.gz yarn-$version
