Skip to content

Commit

Permalink
Try to work around transiently failing commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
SirVer committed Apr 18, 2015
1 parent aeb2e24 commit 3ccc14d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions install_vim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,23 @@ build_vanilla_vim () {
rm -rf vim_build
}

repeat_transiently_failing_command () {
COMMAND=$1; shift

set +e
until ${COMMAND}; do
sleep 10
done
set -e
}

# Clone the dependent plugins we want to use.
./test_all.py --clone-plugins

# Install tmux (> 1.8) and vim.
add-apt-repository ppa:kalakris/tmux -y
apt-get update -qq
apt-get install -qq -y tmux
repeat_transiently_failing_command "add-apt-repository ppa:kalakris/tmux -y"
repeat_transiently_failing_command "apt-get update -qq"
repeat_transiently_failing_command "apt-get install -qq -y tmux"

if [[ $VIM_VERSION == "74" ]]; then
build_vanilla_vim ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
Expand Down

0 comments on commit 3ccc14d

Please sign in to comment.