build_submodules.sh 435 字节
Newer Older
1 2
#!/bin/bash
set -e
3
WORK_DIR=$PWD
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
PROJ_ROOT=$(git rev-parse --show-cdup)
SUBMODULES=$(grep path ${PROJ_ROOT}.gitmodules | sed 's/^.*path = //')

for module in $SUBMODULES
do
  case $module in
    "warp-ctc")
      if [ -d ${PROJ_ROOT}warp-ctc/build ]; then
        rm -rf ${PROJ_ROOT}warp-ctc/build
      fi
      mkdir ${PROJ_ROOT}warp-ctc/build
      cd ${PROJ_ROOT}warp-ctc/build
      cmake ..; make
    ;;
  esac
done
20
cd $WORK_DIR