build.sh 653 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. cd code_boost/src/build/
  3. cmake ..
  4. if [ -f Makefile ]; then
  5. make
  6. else
  7. echo "CMake did not finish successfully."
  8. exit
  9. fi
  10. if [ $? -eq 0 ]; then
  11. cp libpcapreader.so ../../../code/ID2TLib/
  12. else
  13. echo "Make did not finish successfully."
  14. exit
  15. fi
  16. cd ../../../
  17. #ln -s code/CLI.py id2t.py
  18. # Create the ID2T script
  19. cat >./id2t <<EOF
  20. #!/bin/sh
  21. # Find the executable
  22. ID2T_DIR=\$(readlink -f \$0)
  23. SCRIPT_PATH=\${ID2T_DIR%/*}
  24. cd \$SCRIPT_PATH
  25. # Execute ID2T
  26. exec ./code/CLI.py "\$@"
  27. EOF
  28. chmod +x ./code/CLI.py
  29. chmod +x ./id2t
  30. echo -e "\n\nAll is set. ID2T is ready to be used."
  31. echo -e "\nRun ID2T with the command './id2t'"