1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fab-manager_ynh.git synced 2024-09-03 18:36:16 +02:00

install rbenv-vars

This commit is contained in:
Gredin67 2024-02-27 17:31:40 +01:00 committed by GitHub
parent c2e6b04c87
commit a7ad4efff7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -213,6 +213,21 @@ ynh_install_ruby () {
git clone -q https://github.com/tpope/rbenv-aliases.git "${rbenv_install_dir}/plugins/rbenv-aliase"
fi
rbenv_vars="$(command -v "$rbenv_install_dir"/plugins/*/bin/rbenv-vars rbenv-vars | head -1)"
if [ -n "$rbenv_vars" ]; then
ynh_print_info --message="\`rbenv vars' command already available in \`$rbenv_vars'."
pushd "${rbenv_vars%/*/*}"
if git remote -v 2>/dev/null | grep "https://github.com/rbenv/rbenv-vars.git"; then
ynh_print_info --message="Trying to update rbenv-vars with git..."
git pull -q origin master
fi
popd
else
ynh_print_info --message="Installing rbenv-vars with git..."
mkdir -p "${rbenv_install_dir}/plugins"
git clone -q https://github.com/rbenv/rbenv-vars.git "${rbenv_install_dir}/plugins/rbenv-vars"
fi
rbenv_latest="$(command -v "$rbenv_install_dir"/plugins/*/bin/rbenv-latest rbenv-latest | head -1)"
if [ -n "$rbenv_latest" ]; then
ynh_print_info --message="\`rbenv latest' command already available in \`$rbenv_latest'."