#!/usr/bin/env bash usage() { local error="$1" cat >&2 < $error EOF exit 1 } args="$@" if [[ -z "$args" ]]; then usage "No arguments specified." fi PROJECT=$1 REV=$2 mkdir -p release git archive --prefix="$REV/" \ -o release/$REV.tar.gz \ $REV:pkg/$PROJECT