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

Update ynh_install_ruby script

This commit is contained in:
Fabian Wilkens 2021-01-30 22:44:08 +01:00
parent 97283ba14c
commit a4f4b2d7b0
No known key found for this signature in database
GPG key ID: 23DFA025BB4E9FAB

View file

@ -94,7 +94,7 @@ ynh_install_ruby () {
CONFIGURE_OPTS="--disable-install-doc" MAKE_OPTS="-j2" rbenv install --skip-existing $ruby_version
# Store the ID of this app and the version of ruby requested for it
echo "$YNH_APP_ID:$ruby_version" | tee --append "$rbenv_install_dir/ynh_app_version"
echo "$YNH_APP_INSTANCE_NAME:$ruby_version" | tee --append "$rbenv_install_dir/ynh_app_version"
# Store ruby_version into the config of this app
ynh_app_setting_set $app ruby_version $ruby_version
@ -124,7 +124,7 @@ ynh_remove_ruby () {
ruby_version=$(ynh_app_setting_get $app ruby_version)
# Remove the line for this app
sed --in-place "/$YNH_APP_ID:$ruby_version/d" "$rbenv_install_dir/ynh_app_version"
sed --in-place "/$YNH_APP_INSTANCE_NAME:$ruby_version/d" "$rbenv_install_dir/ynh_app_version"
# If no other app uses this version of ruby, remove it.
if ! grep --quiet "$ruby_version" "$rbenv_install_dir/ynh_app_version"