2
0

build_gprof2dot.sh 440 B

1234567891011121314151617
  1. #!/bin/bash
  2. # check exists.
  3. if [[ -d graphviz-2.18 ]]; then
  4. echo "graphviz is ok";
  5. exit 0;
  6. fi
  7. # check sudoer.
  8. sudo echo "ok" > /dev/null 2>&1;
  9. ret=$?; if [[ 0 -ne ${ret} ]]; then echo "you must be sudoer"; exit 1; fi
  10. unzip -q graphviz-2.36.0.zip
  11. cd graphviz-2.36.0 && ./configure && make && sudo make install
  12. ret=$?; if [[ $ret -ne 0 ]]; then echo "build gprof2dot failed."; exit $ret; fi
  13. echo "we test in Centos6.0, it's ok"