File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1515 exit 1
1616fi
1717
18+ if [ -n " $TRAVIS_BRANCH " ]; then
19+ CLI_BRANCH=" $TRAVIS_BRANCH "
20+ else
21+ CLI_BRANCH=$( git -C " ${BASH_SOURCE%/* } " rev-parse --abbrev-ref HEAD)
22+ fi
23+
24+ BOILERPLATE_URL=" https://github.com/cppsm/cppsm-boilerplate.git"
25+
1826if [ ! -d .cppsm ]; then
19- git submodule " ${GIT_QUIET[@]} " add --branch master https://github.com/cppsm/cppsm-boilerplate.git .cppsm
27+ if git ls-remote --heads " $BOILERPLATE_URL " | grep -q " \brefs/heads/$CLI_BRANCH \$ " ; then
28+ BOILERPLATE_BRANCH=" $CLI_BRANCH "
29+ else
30+ BOILERPLATE_BRANCH=" master"
31+ fi
32+ git submodule " ${GIT_QUIET[@]} " add --branch " $BOILERPLATE_BRANCH " " $BOILERPLATE_URL " .cppsm
2033fi
2134
2235ln -fs .cppsm/.clang-format .clang-format
@@ -27,7 +40,7 @@ if [ ! -e CMakeLists.txt ]; then
2740 cat << EOF > CMakeLists.txt
2841cmake_minimum_required(VERSION 3.9)
2942project(${PWD##*/ } )
30- include(.cppsm/c++17-no-rtti-no-exns .cmake)
43+ include(.cppsm/c++17.cmake)
3144EOF
3245fi
3346
You can’t perform that action at this time.
0 commit comments