blob: 61fccd49f48482b234a0072801bc185051707ab0 [file] [log] [blame]
Brian Silvermancee260a2015-12-24 16:27:51 -08001#!/bin/bash
2
3# A script to generate a allwpilib_ni-libraries_bla.tar.gz file from a given
4# revision of allwpilib.
5
6# Example: ./doc/allwpilib_ni-libraries_tarball.sh \
7# https://usfirst.collab.net/gerrit/allwpilib master
8
9set -e
10set -u
11set -o pipefail
12
13if [ $# -ne 2 ]; then
14 echo "Usage: $0 remote ref" >&2
15 exit 1
16fi
17
18REMOTE="$1"
19REF="$2"
20
21git fetch "${REMOTE}" "${REF}"
22
23git archive \
24 -o allwpilib_ni-libraries_$(git rev-parse --short FETCH_HEAD).tar.gz \
25 FETCH_HEAD ni-libraries