cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dreadedhill
Observer
Observer
166 Views
Registered: ‎01-26-2019

Corrected installLibs.sh script for Vitis

After using the GUI installer, was instructed to run scripts/installLibs.sh. The script failed, so wrote a better replacement. Count this more as an answer than a question.

#!/bin/bash

echo "
==== Check that we can sudo."
sudo echo "We can." || { 
    echo "ERROR cannot sudo!"
    exit 1
}

STAMP=$(date '+%Y-%m-%d_%H-%M-%S')
LOGFILE=$HOME/.Xilinx/xinstall/install_$STAMP.log

TESTFILE=/tmp/what-os.txt
{ 
    cat /etc/os-release 
    lsb_release -a  
} > $TESTFILE 2>&1

echo "
==== Logging into: $LOGFILE"
{
    < $TESTFILE grep -qi 'UBUNTU' && {
        sudo apt-get install -y libc6-dev-i386 net-tools graphviz unzip g++ libtinfo5 
        ### gmake require for v++ flow (CIPS IP generation)
        sudo ln -s /usr/bin/make /usr/bin/gmake
    }
    < $TESTFILE grep -qi 'REDHAT\|CENTOS' && {
        sudo yum install -y graphviz redhat-lsb openssl libXScrnSaver gcc gcc-c++ kernel-headers-`uname -r` kernel-devel-`uname -r` 
    }
    < $TESTFILE grep -qi 'CENTOS' && {
        sudo yum install -y epel-release 
    }

} 2>&1 | tee $LOGFILE

 

Tags (2)
0 Kudos
0 Replies