blob: 07058a0eec549178b8e075a2dbe0339ae09f136c [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
Brian Silvermane48dbc12017-02-04 20:06:29 -08006# Example: `./doc/allwpilib_ni-libraries_tarball.sh https://github.com/wpilibsuite/allwpilib master`
Brian Silvermancee260a2015-12-24 16:27:51 -08007
8set -e
9set -u
10set -o pipefail
11
12if [ $# -ne 2 ]; then
13 echo "Usage: $0 remote ref" >&2
14 exit 1
15fi
16
17REMOTE="$1"
18REF="$2"
19
20git fetch "${REMOTE}" "${REF}"
21
22git archive \
23 -o allwpilib_ni-libraries_$(git rev-parse --short FETCH_HEAD).tar.gz \
24 FETCH_HEAD ni-libraries