|
12345678910111213141516171819202122232425262728293031323334353637 |
- #!/usr/bin/env bash
- #
- # Download and prepare the 3rd-party libraries
- #
- # Author: donkey <anjingyu_ws@foxmail.com>
-
- readonly CUR_DIR=$(cd `dirname $0`; pwd)
- readonly PROJ_DIR=`dirname $CUR_DIR`
-
- function fetch_imgui()
- {
- local _REPO="https://github.com/ocornut/imgui"
- 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)
-
- git clone --branch ${_TAG} --depth 1 $_REPO $PROJ_DIR/3rd-party/imgui
- }
-
- function fetch_node_editor()
- {
- local _REPO="https://github.com/thedmd/imgui-node-editor"
- 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)
-
- git clone --branch ${_TAG} --depth 1 $_REPO $PROJ_DIR/3rd-party/imgui-node-editor
- }
-
- function main()
- {
- if [ ! -d "$PROJ_DIR/3rd-party" ]; then
- mkdir -p "${PROJ_DIR}/3rd-party"
- fi
-
- fetch_imgui
- fetch_node_editor
- }
-
- main "$@"
-
|