blob: 8e052338aba174b88091d2ab75c28b9b3e08afd9 [file] [log] [blame]
Brian Silverman9c0f1452015-01-10 21:19:39 -08001#!/bin/bash -e
2
3# This script copies the correct directories over from an allwpilib git
4# repository (which needs to have a working tree).
5# THIS WILL ERASE ANY LOCAL CHANGES TO THE WPILIB SOURCES!
6
7# Takes 1 argument: the folder to copy from.
8
9cd $(dirname $0)
10
11SOURCE=$1
12DIRS="wpilibc hal ni-libraries"
13
14[ -n "${SOURCE}" ] || ( echo "Need a directory to sync from!" ; exit 1 )
15[ -d "${SOURCE}" ] || ( echo "${SOURCE} is not a directory. Aborting!" ; exit 1 )
16
17for dir in ${DIRS}; do
18 [ -d ${dir} ] && rm -r ${dir}
19 cp -r ${SOURCE}/${dir} ./
20done