Brian Silverman | 9c0f145 | 2015-01-10 21:19:39 -0800 | [diff] [blame] | 1 | #!/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 | |
| 9 | cd $(dirname $0) |
| 10 | |
| 11 | SOURCE=$1 |
| 12 | DIRS="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 | |
| 17 | for dir in ${DIRS}; do |
| 18 | [ -d ${dir} ] && rm -r ${dir} |
| 19 | cp -r ${SOURCE}/${dir} ./ |
| 20 | done |