forked from YangModels/yang
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to sync from OpenDaylight (YangModels#556)
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# TODO create sub-directories per opendaylight branch | ||
|
||
if [ -z "$1" ]; then | ||
echo "USAGE: sync.sh <PATH-TO-YOUR-opendaylight.git/releng/autorelease>" | ||
exit | ||
fi | ||
set -ex | ||
|
||
pushd . | ||
cd $1 | ||
git pull | ||
git submodule init | ||
git submodule update | ||
git submodule foreach git reset --hard | ||
git submodule foreach git checkout origin/master | ||
git submodule foreach git pull --ff-only origin master | ||
popd | ||
|
||
git rm experimental/odp/* | ||
|
||
# There is a probably a better way to do this, but this works... ;-) | ||
find /home/vorburger/dev/ODL/git/releng/autorelease -name "*.yang" -path "*src/main/yang*" ! -path "*test*" -printf 'cp %p experimental/odp/%f\n' >/tmp/copy-yang.sh | ||
source /tmp/copy-yang.sh | ||
|
||
git add experimental/odp/* |