From 703e50496c3d45e25ff7aa8d3dce20755758d02a Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Tue, 22 Jan 2019 22:11:58 +0100 Subject: [PATCH] add script to sync from OpenDaylight (#556) --- sync.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 sync.sh diff --git a/sync.sh b/sync.sh new file mode 100755 index 000000000..75a2f8ca7 --- /dev/null +++ b/sync.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# TODO create sub-directories per opendaylight branch + +if [ -z "$1" ]; then + echo "USAGE: sync.sh " + 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/*