Created
April 19, 2017 20:00
-
-
Save iwatakeshi/b4fd17223e5c7875605a02e08e9e98a3 to your computer and use it in GitHub Desktop.
Installs Insight for Ubuntu
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
#!/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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
但是我遇到了这样的bug