#!/bin/sh

if [ "$#" -eq 0 ]; then
	echo "Usage:"
	echo "  $0 <version>"
	exit 1
fi

VER=$1

echo "downloading and packing $VER"

DIR=rainloop-community-$VER
mkdir $DIR
cd $DIR

wget https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip
unzip rainloop-community-latest.zip
rm -f rainloop-community-latest.zip
cd ..
tar cvzf $DIR.tar.gz $DIR

rm -rf $DIR




