submodules.sh 408 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/bash
set -e
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