From c857639d5956d2238c03e696a7fa9b47cc0387fd Mon Sep 17 00:00:00 2001 From: Chen Gong Date: Sun, 31 Mar 2019 14:04:36 +0800 Subject: [PATCH] feat(travis-ci): install plugins specified in envvar RIME_PLUGINS --- travis-install-plugins.sh | 12 ++++++++++++ travis-install.sh | 5 +++++ 2 files changed, 17 insertions(+) create mode 100755 travis-install-plugins.sh 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