1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snweb_ynh.git synced 2024-09-03 20:26:22 +02:00

Use standard ruby helpers

This commit is contained in:
Salamandar 2024-05-20 23:48:05 +02:00
parent 2b45092c24
commit d54f5aa167

View file

@ -12,29 +12,6 @@ node_max_old_space_size=2048
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================
# Remove the version of Ruby used by the app.
#
# This helper will also cleanup Ruby versions
#
# usage: ynh_remove_ruby
ynh_remove_ruby () {
local ruby_version=$(ynh_app_setting_get --app="$YNH_APP_INSTANCE_NAME" --key=ruby_version)
# Load rbenv path in PATH
local CLEAR_PATH="$rbenv_install_dir/bin:$PATH"
# Remove /usr/local/bin in PATH in case of Ruby prior installation
PATH="$(echo "$CLEAR_PATH" | sed 's@/usr/local/bin:@@')"
rbenv alias "$YNH_APP_INSTANCE_NAME" --remove
# Remove the line for this app
ynh_app_setting_delete --app="$YNH_APP_INSTANCE_NAME" --key=ruby_version
# Cleanup Ruby versions
ynh_cleanup_ruby
}
#================================================ #================================================
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS
#================================================= #=================================================