1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00

Update ynh_install_ruby__2

This commit is contained in:
yalh76 2021-03-12 23:41:08 +01:00
parent c4d58a6ba3
commit 05b6dc21ff

View file

@ -155,10 +155,10 @@ ynh_install_ruby () {
git clone -q https://github.com/rbenv/ruby-build.git "${rbenv_install_dir}/plugins/ruby-build"
fi
rb_alias="$(command -v "$rbenv_install_dir"/plugins/*/bin/rbenv-alias rbenv-alias | head -1)"
if [ -n "$rb_alias" ]; then
ynh_print_info --message="\`rbenv alias' command already available in \`$rb_alias'."
pushd "${rb_alias%/*/*}"
rbenv_alias="$(command -v "$rbenv_install_dir"/plugins/*/bin/rbenv-alias rbenv-alias | head -1)"
if [ -n "$rbenv_alias" ]; then
ynh_print_info --message="\`rbenv alias' command already available in \`$rbenv_alias'."
pushd "${rbenv_alias%/*/*}"
if git remote -v 2>/dev/null | grep -q rbenv-aliases; then
ynh_print_info --message="Trying to update rbenv-aliases with git..."
git pull -q origin master
@ -170,10 +170,10 @@ ynh_install_ruby () {
git clone -q https://github.com/tpope/rbenv-aliases.git "${rbenv_install_dir}/plugins/rbenv-aliase"
fi
rb_latest="$(command -v "$rbenv_install_dir"/plugins/*/bin/rbenv-latest rbenv-latest | head -1)"
if [ -n "$rb_latest" ]; then
ynh_print_info --message="\`rbenv latest' command already available in \`$rb_latest'."
pushd "${rb_latest%/*/*}"
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'."
pushd "${rbenv_latest%/*/*}"
if git remote -v 2>/dev/null | grep -q xxenv-latest; then
ynh_print_info --message="Trying to update xxenv-latest with git..."
git pull -q origin master