You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.8 KiB

  1. #!/usr/bin/env bash
  2. set -e
  3. if [ $BUILD_TOOLS = false ] && [ $BUILD_TESTING = false ]; then
  4. curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host i686-unknown-linux-gnu
  5. source ~/.profile
  6. mkdir rust-g
  7. cd rust-g
  8. git init
  9. git remote add origin https://github.com/tgstation/rust-g
  10. git fetch --depth 1 origin $RUST_G_VERSION
  11. git checkout FETCH_HEAD
  12. cargo build --release
  13. mkdir -p ~/.byond/bin
  14. ln -s $PWD/target/release/librust_g.so ~/.byond/bin/rust_g
  15. mkdir -p ../BSQL/artifacts
  16. cd ../BSQL
  17. git init
  18. git remote add origin https://github.com/tgstation/BSQL
  19. git fetch --depth 1 origin $BSQL_VERSION
  20. git checkout FETCH_HEAD
  21. if [ -f "$HOME/MariaDB/libmariadb.so.2" ] && [ -f "$HOME/MariaDB/libmariadb.so" ] && [ -d "$HOME/MariaDB/include" ];
  22. then
  23. echo "Using cached MariaDB library."
  24. else
  25. echo "Setting up MariaDB."
  26. rm -rf "$HOME/MariaDB"
  27. mkdir -p "$HOME/MariaDB"
  28. wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mariadb-client-lgpl/libmariadb2_2.0.0-1_i386.deb
  29. dpkg -x libmariadb2_2.0.0-1_i386.deb /tmp/extract
  30. rm libmariadb2_2.0.0-1_i386.deb
  31. mv /tmp/extract/usr/lib/i386-linux-gnu/libmariadb.so.2 $HOME/MariaDB/
  32. ln -s $HOME/MariaDB/libmariadb.so.2 $HOME/MariaDB/libmariadb.so
  33. rm -rf /tmp/extract
  34. wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mariadb-connector-c/libmariadb-dev_2.3.3-1_i386.deb
  35. dpkg -x libmariadb-dev_2.3.3-1_i386.deb /tmp/extract
  36. rm libmariadb-dev_2.3.3-1_i386.deb
  37. mv /tmp/extract/usr/include $HOME/MariaDB/
  38. #fuck what is this even?
  39. mv $HOME/MariaDB/include/mariadb $HOME/MariaDB/include/mysql
  40. fi
  41. cd artifacts
  42. export CXX=g++-7
  43. cmake .. -DMARIA_INCLUDE_DIR=$HOME/MariaDB/include
  44. make
  45. mv src/BSQL/libBSQL.so ../../
  46. fi