Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installs Insight for Ubuntu
#!/bin/bash
get_deps() {
sudo apt install build-essentials autoconf autogen texinfo zlib1g-dev tcl-dev tk-dev mesa-common-dev libjpeg-dev libtogl-dev python-dev flex bison itcl3 itk3 iwidgets4 git
}
get_insight() {
git clone --recursive https://github.com/monnerat/insight.git
}
cd_to_insight() {
cd ./insight/
}
cd_to_gdb() {
cd ./bundle/gdb/
}
cd_out_of_gdb() {
cd "../../"
}
reinstall_gdb() {
sudo apt remove gdb && sudo apt install gdb
}
clean_up() {
cd ../ && rm -r -f ./insight/
}
install_insight () {
cd_to_insight && autoconf && ./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 && make && cd_to_gdb make && cd_out_of_gdb && sudo make install
}
if [ -d "./insight/" ]; then
install_insight && reinstall_gdb && clean_up
else
get_deps && get_insight && install_insight && reinstall_gdb && clean_up
fi
@iwatakeshi

This comment has been minimized.

Copy link
Owner Author

commented Apr 19, 2017

Usage

# change permissions
chmod +x ./insight.sh
# note that the dot before the script is required
. ./insight.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.