From faba4c37672fe379a6e849532c4f2ab46d30dd3e Mon Sep 17 00:00:00 2001 From: Le Tian Ren Date: Thu, 14 Aug 2014 15:44:19 +0800 Subject: [PATCH] Test gerrit review process on experimental branch. Add a script to help to create common utils symbolic links for each driver component. Change-Id: I45914db6d366511235e0e9507bc000e50651c992 Closes-Bug: 1356720 --- linkcommon.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 linkcommon.sh diff --git a/linkcommon.sh b/linkcommon.sh new file mode 100755 index 0000000..4f06683 --- /dev/null +++ b/linkcommon.sh @@ -0,0 +1,35 @@ +# Copyright 2013 IBM Corp. + +#!/bin/sh +# +# This script is for link powervc common code to each powervc modules. +# + +target="common-powervc/powervc/common" +pushd . +cd $target && target=`pwd` +popd + +declare -a components +declare -a linktopaths + +components=( + nova + cinder + glance + neutron +); + +pvc="powervc" + + +for ((i=0; i<${#components[@]}; i++)); +do + linktopaths[$i]="${components[$i]}-$pvc/$pvc" + if [[ $1 == '-del' ]]; then + rm ${linktopaths[$i]}/common + else + ln -s $target ${linktopaths[$i]} + fi +done; +