sed -i "/<modelVersion>/ a <groupId>org.eclipse.tycho<\/groupId><version>${v}<\/version>""$1/pom.xml"
sed -i "/<artifactId>org.eclipse.osgi<\/artifactId>/ a <version>${osgiV}</version>""$1/pom.xml"
sed -i "/<artifactId>org.eclipse.osgi.compatibility.state<\/artifactId>/ a <version>${osgiV}</version>""$1/pom.xml"
}
function unifyProject (){
aid=$(basename $(dirname $1))
if["${aid}"='.'];then
aid='tycho'
fi
sed -i "/<groupId>org.eclipse.tycho<\/groupId><version>${v}<\/version>/ d""$1/pom.xml"
sed -i "/<modelVersion>/ a <parent>\n<groupId>org.eclipse.tycho<\/groupId>\n<artifactId>${aid}<\/artifactId>\n<version>${preV}<\/version>\n<\/parent>""$1/pom.xml"
sed -i "/<version>${osgiV}<\/version>/ d""$1/pom.xml"
}
function readBSN (){
bsn=
manEntryPat="^[a-zA-Z-]*:"
foundBSNLine=0
whileread line;do
if[${foundBSNLine} -eq 1];then
echo${line}| grep -qE ${manEntryPat}
if[$? -eq 0];then
break
else
bsn=${bsn}"`echo ${line} | sed 's/\([a-zA-Z0-9_.-]*\)\(;\)\?.*/\1/'`"
fi
fi
echo${line}| grep -q "Bundle-SymbolicName:"
if[$? -eq 0];then
bsn=`echo${line}| grep 'Bundle-SymbolicName:'| sed 's/Bundle-SymbolicName: \([a-zA-Z0-9_.-]*\)\(;\)\?.*/\1/'`