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

setup.sh 994 B

2 years ago
12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env bash
  2. #
  3. # Download and prepare the 3rd-party libraries
  4. #
  5. # Author: donkey <anjingyu_ws@foxmail.com>
  6. readonly CUR_DIR=$(cd `dirname $0`; pwd)
  7. readonly PROJ_DIR=`dirname $CUR_DIR`
  8. function fetch_imgui()
  9. {
  10. local _REPO="https://github.com/ocornut/imgui"
  11. local _TAG=$(git ls-remote --refs -t --sort=-v:refname $_REPO | grep "/v[0-9]\+\.[0-9]\+\.[0-9]\+-docking$" | head -n 1 | cut -f 2 | cut -d "/" -f 3)
  12. git clone --branch ${_TAG} --depth 1 $_REPO $PROJ_DIR/3rd-party/imgui
  13. }
  14. function fetch_node_editor()
  15. {
  16. local _REPO="https://github.com/thedmd/imgui-node-editor"
  17. local _TAG=$(git ls-remote --refs -t --sort=-v:refname $_REPO | grep "/v[0-9]\+\.[0-9]\+\.[0-9]\+$" | head -n 1 | cut -f 2 | cut -d "/" -f 3)
  18. git clone --branch ${_TAG} --depth 1 $_REPO $PROJ_DIR/3rd-party/imgui-node-editor
  19. }
  20. function main()
  21. {
  22. if [ ! -d "$PROJ_DIR/3rd-party" ]; then
  23. mkdir -p "${PROJ_DIR}/3rd-party"
  24. fi
  25. fetch_imgui
  26. fetch_node_editor
  27. }
  28. main "$@"