Skip to content

Commit 685efb1

Browse files
committed
Add checkout script.
1 parent 70aa3ed commit 685efb1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

samples/scenarios/checkout.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# Simple script to setup localrc on test node.
4+
# Execute this script from the root directory. For example:
5+
#
6+
# $ samples/scenarios/setup.sh
7+
#
8+
# Assumes your hostname has been set to one of gto, mustang, or charger.
9+
#
10+
# Modify the SCENARIO variable below to use a different scenario.
11+
12+
HOSTNAME=`hostname`
13+
SCENARIO=multinode-ovs
14+
INFO_FILE=samples/scenarios/$SCENARIO/$HOSTNAME-info
15+
STACK_ROOT=/opt/stack
16+
17+
echo $INFO_FILE
18+
for l in `grep git $INFO_FILE`
19+
do
20+
MOD=`echo $l | awk -F"|" '{ print $2; }'`
21+
VER=`echo $l | awk -F"|" '{ print substr($3, 8, 7); }'`
22+
23+
if [ $MOD != "git-core" ]; then
24+
pushd $STACK_ROOT/$MOD
25+
git checkout $VER
26+
popd
27+
fi
28+
done

0 commit comments

Comments
 (0)