File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 1212# package versions
1313klayoutVersion=0.28.8
1414
15+ _versionCompare (){
16+ local a b IFS=. ; set -f
17+ printf -v a %08d $1 ; printf -v b %08d $3
18+ test $a " $2 " $b
19+ }
20+
1521_installORDependencies () {
1622 ./tools/OpenROAD/etc/DependencyInstaller.sh ${OR_INSTALLER_ARGS}
1723}
@@ -42,11 +48,10 @@ _installCentosPackages() {
4248 if ! [ -x " $( command -v klayout) " ]; then
4349 yum install -y https://www.klayout.org/downloads/CentOS_7/klayout-${klayoutVersion} -0.x86_64.rpm
4450 else
45- currentver=" $( klayout -v) "
46- currentver=$( echo $currentver | grep -o ' [0-9]\+\.[0-9]\+\.[0-9]\+' )
47- currentver=$( echo $currentver | tr -d ' .' )
48- requiredver=$( echo $klayoutVersion | tr -d ' .' )
49- if [ " $currentver " -ge " $requiredver " ]; then
51+ currentVersion=" $( klayout -v) "
52+ currentVersion=$( echo $currentVersion | grep -o ' [0-9]\+\.[0-9]\+\.[0-9]\+' )
53+ requiredVersion=$( echo $klayoutVersion )
54+ if _versionCompare $currentVersion -ge $requiredVersion ; then
5055 echo " KLayout version greater than or equal to ${klayoutVersion} "
5156 else
5257 echo " KLayout version less than ${klayoutVersion} "
You can’t perform that action at this time.
0 commit comments