You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by uc...@apache.org on 2018/02/15 11:07:32 UTC
[3/3] flink git commit: [FLINK-8303] [docs] Allow to overwrite
ruby/gem binary
[FLINK-8303] [docs] Allow to overwrite ruby/gem binary
This closes #5395.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/aefd976c
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/aefd976c
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/aefd976c
Branch: refs/heads/master
Commit: aefd976cc283a369779eca8bddf738694393d23a
Parents: 9708873
Author: Ufuk Celebi <uc...@apache.org>
Authored: Thu Feb 15 11:58:31 2018 +0100
Committer: Ufuk Celebi <uc...@apache.org>
Committed: Thu Feb 15 12:06:47 2018 +0100
----------------------------------------------------------------------
docs/build_docs.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/aefd976c/docs/build_docs.sh
----------------------------------------------------------------------
diff --git a/docs/build_docs.sh b/docs/build_docs.sh
index 0ef7170..f9ffc5a 100755
--- a/docs/build_docs.sh
+++ b/docs/build_docs.sh
@@ -17,6 +17,9 @@
# limitations under the License.
################################################################################
+RUBY=${RUBY:-ruby}
+GEM=${GEM:-gem}
+
set -e
cd "$(dirname ${BASH_SOURCE[0]})"
@@ -28,12 +31,12 @@ if [ "`command -v bundle`" == "" ]; then
echo "Attempting to install locally. If this doesn't work, please install with 'gem install bundler'."
# Adjust the PATH to discover the locally installed Ruby gem
- if which ruby >/dev/null && which gem >/dev/null; then
- export PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH"
+ if which ${RUBY} >/dev/null && which gem >/dev/null; then
+ export PATH="$(${RUBY} -rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi
# install bundler locally
- gem install --user-install bundler
+ ${GEM} install --user-install bundler
fi
# Install Ruby dependencies locally
@@ -53,7 +56,7 @@ while getopts "pi" opt; do
JEKYLL_CMD="serve --baseurl= --watch"
;;
i)
- [[ `ruby -v` =~ 'ruby 1' ]] && echo "Error: building the docs with the incremental option requires at least ruby 2.0" && exit 1
+ [[ `${RUBY} -v` =~ 'ruby 1' ]] && echo "Error: building the docs with the incremental option requires at least ruby 2.0" && exit 1
bundle install --path .rubydeps
JEKYLL_CMD="liveserve --baseurl= --watch --incremental"
;;