#!/bin/sh version=$(rpm -q --specfile --qf='%{version}\n' uglify-js.spec | head -n1) wget https://github.com/mishoo/UglifyJS2/archive/v$version.tar.gz tar -zxf v$version.tar.gz cd UglifyJS2-$version npm install && cd .. && tar -zcf uglify-js-v$version.tar.gz UglifyJS2-$version