c6d13d
#!/bin/bash
c6d13d
c6d13d
if [ $# -lt 2 ]
c6d13d
then
c6d13d
  echo "$0 <name> <version>"
c6d13d
  exit 1
c6d13d
fi
c6d13d
c6d13d
set -x
c6d13d
set -e
c6d13d
c6d13d
CURRDIR=$(pwd)
c6d13d
c6d13d
TMPDIRPATH=$(mktemp -d /var/tmp/$1-tar-XXXXXX)
c6d13d
pushd $TMPDIRPATH
c6d13d
c6d13d
git clone https://github.com/sparklemotion/$1.git
c6d13d
pushd $1
c6d13d
git reset --hard v$2
c6d13d
popd
c6d13d
c6d13d
ln -sf $1 $1-$2
c6d13d
tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./
c6d13d
c6d13d
popd
c6d13d
c6d13d
rm -rf $TMPDIRPATH