File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+ #
3
+ # Assumes that the allwpilib repo is checked out to the correct branch
4
+ # that needs to be added to this repo
5
+ #
6
+ # This script is only intended to be used by maintainers of this
7
+ # repository, users should not need to use it.
8
+ #
9
+
10
+ abspath () {
11
+ # $1 : relative filename
12
+ echo " $( cd " $( dirname " $1 " ) " && pwd) /$( basename " $1 " ) "
13
+ }
14
+
15
+ if [ " $1 " == " " ]; then
16
+ echo " Usage: $0 /path/to/allwpilib"
17
+ exit 1
18
+ fi
19
+
20
+ ALLWPILIB=$( abspath " $1 " )
21
+
22
+ cd $( dirname " $0 " ) /..
23
+
24
+ if [ ! -z " $( git status --porcelain --untracked-files=no) " ]; then
25
+ echo " Working tree is dirty, exiting"
26
+ exit 1
27
+ fi
28
+
29
+ ORIG_BRANCH=" $( git symbolic-ref --short HEAD 2> /dev/null) "
30
+
31
+
32
+ pushd " $ALLWPILIB "
33
+
34
+ # TODO: this takes awhile
35
+ git subtree split --prefix=wpilibNewCommands/src/main/native/ -b cmd-v2-upstream
36
+
37
+ popd
38
+
39
+
40
+ git checkout upstream
41
+
42
+ git subtree pull --prefix commands2/src $ALLWPILIB cmd-v2-upstream
43
+
44
+ git checkout $ORIG_BRANCH
You can’t perform that action at this time.
0 commit comments