Created
November 14, 2018 19:14
-
-
Save okiwan/42490ced2a5701d6b416e72562bc8028 to your computer and use it in GitHub Desktop.
Insight Debugger installation script for Bash on Ubuntu. Tested on 18.04LTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env /bin/bash | |
ORI_FOLDER=$(pwd) | |
TMP_FOLDER=$(mktemp -d) | |
LOG=$(mktemp) | |
APT_FLAGS="-y --reinstall" | |
GIT_FLAGS="-q --recursive" | |
INSIGHT="./configure --prefix=/usr/. --libdir=/usr/lib64 --disable-binutils --disable-elfcpp --disable-gas --disable-gold --disable-gprof --disable-ld --disable-rpath --disable-zlib --enable-sim --with-gdb-datadir=/usr/share/insight --with-jit-reader-dir=/usr/lib64/insight --with-separate-debug-dir='/usr/lib/debug' --with-expat --with-python --without-libunwind" | |
# Stop script at first error found | |
set -e | |
if [ "$EUID" != "0" ]; then | |
echo This script requires sudo to run properly. | |
exit | |
fi | |
echo | |
echo This script will try to deploy insight debugger | |
echo by installing all required dependencies, cloning | |
echo the source repository and building and installing | |
echo the tool. | |
echo | |
echo Log file: $LOG | |
echo | |
echo Starting! | |
echo | |
echo -n · Installing general depedencies... | |
apt-get $APT_FLAGS install autoconf autogen > $LOG | |
echo done. | |
echo -n · Installing dependencies for Bfd... | |
apt-get $APT_FLAGS install texinfo zlib1g-dev > $LOG | |
echo done. | |
echo -n · Installing dependencies for libgui... | |
apt-get $APT_FLAGS install tcl-dev tk-dev mesa-common-dev libjpeg-dev libtogl-dev > $LOG | |
echo done. | |
echo -n · Installing dependencies for GDB... | |
apt-get $APT_FLAGS install python-dev flex bison itcl3 itk3 iwidgets4 > $LOG | |
echo done. | |
echo -n · Cloning insight repository... | |
git clone $GIT_FLAGS git://sourceware.org/git/insight.git $TMP_FOLDER | |
echo done. | |
echo -n · Preparing source for build... | |
cd $TMP_FOLDER | |
echo $INSIGHT > insight.sh | |
chmod u+x insight.sh | |
autoconf > $LOG 2>&1 | |
./insight.sh > $LOG 2>&1 | |
echo done. | |
echo -n · Building Insight... | |
make > $LOG 2>&1 | |
echo done. | |
echo -n · Installing Insight... | |
make install > $LOG 2>&1 | |
echo done. | |
cd $ORI_FOLDER | |
echo Deployment completed successfully! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment