diff --git a/travis-install-plugins.sh b/travis-install-plugins.sh new file mode 100755 index 0000000000..69d797a0df --- /dev/null +++ b/travis-install-plugins.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +for slug in "$@" +do + plugin_project="${slug##*/}" + plugin_dir="plugins/${plugin_project#librime-}" + git clone --depth 1 "https://github.com/${slug}.git" "${plugin_dir}" + + if [[ -e "${plugin_dir}/travis-install.sh" ]]; then + bash "${plugin_dir}/travis-install.sh" + fi +done diff --git a/travis-install.sh b/travis-install.sh index 0aa0f79ee0..b29586afd0 100755 --- a/travis-install.sh +++ b/travis-install.sh @@ -21,3 +21,8 @@ if [[ "$TRAVIS_OS_NAME" == linux ]]; then elif [[ "$TRAVIS_OS_NAME" == osx ]]; then make -f xcode.mk thirdparty fi + +if [[ -n "${RIME_PLUGINS}" ]]; then + # intentionally not quoted: ${RIME_PLUGIN} is a space separated list of slugs + bash ./travis-install-plugins.sh ${RIME_PLUGINS} +fi