File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
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}
@@ -39,7 +45,18 @@ _installCentosPackages() {
3945 ruby-devel \
4046 tcl-devel
4147
42- yum install -y https://www.klayout.org/downloads/CentOS_7/klayout-${klayoutVersion} -0.x86_64.rpm
48+ if ! [ -x " $( command -v klayout) " ]; then
49+ yum install -y https://www.klayout.org/downloads/CentOS_7/klayout-${klayoutVersion} -0.x86_64.rpm
50+ else
51+ currentVersion=$( klayout -v | grep -o ' [0-9]\+\.[0-9]\+\.[0-9]\+' )
52+ if _versionCompare $currentVersion -ge $klayoutVersion ; then
53+ echo " KLayout version greater than or equal to ${klayoutVersion} "
54+ else
55+ echo " KLayout version less than ${klayoutVersion} "
56+ sudo yum remove -y klayout
57+ yum install -y https://www.klayout.org/downloads/CentOS_7/klayout-${klayoutVersion} -0.x86_64.rpm
58+ fi
59+ fi
4360}
4461
4562_installUbuntuCleanUp () {
You can’t perform that action at this time.
0 commit comments