Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 21 lines (16 sloc) 446 Bytes
#! /bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <branch or tag>"
exit 1
fi
set -e
refname="$1"
tmp=$(mktemp -d /tmp/phantomjs_rpm_XXXX)
basedir=$(cd $(dirname "$0") && pwd)
gitbase=git://github.com/ariya/phantomjs.git
cd "${tmp}"
git clone "${gitbase}"
cd phantomjs
git checkout "${refname}"
git archive --verbose --prefix "phantomjs-${refname}/" --output "${basedir}/SOURCES/phantomjs-${refname}-source.tar.gz" HEAD
rm -rf "${tmp}"