Skip to content

Commit

Permalink
add script to sync from OpenDaylight (YangModels#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed Jan 22, 2019
1 parent 61aa90d commit 703e504
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions sync.sh
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/*

0 comments on commit 703e504

Please sign in to comment.