1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/drupal_ynh.git synced 2024-09-03 18:35:53 +02:00

factorisation

This commit is contained in:
yalh76 2020-03-28 21:48:50 +01:00
parent 33a1198801
commit 00e5921471
2 changed files with 12 additions and 11 deletions

View file

@ -106,12 +106,13 @@ fi
#=================================================
ynh_print_info --message="Updating Drush alias..."
cp -f "../conf/example.site.yml" "$final_path/drush/sites/$app.site.yml"
drush_aliasconfig="$final_path/drush/sites/$app.site.yml"
cp -f "../conf/example.site.yml" "$drush_aliasconfig"
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$new_path" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$drush_aliasconfig"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$drush_aliasconfig"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$drush_aliasconfig"
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$new_path" --target_file="$drush_aliasconfig"
#=================================================
# GENERIC FINALISATION

View file

@ -133,13 +133,13 @@ ynh_add_swap --size=512
ynh_print_info --message="Creating Drush alias..."
mkdir -p "$final_path/drush/sites/"
drush_aliasconfig="$final_path/drush/sites/$app.site.yml"
cp -f "../conf/example.site.yml" "$drush_aliasconfig"
cp -f "../conf/example.site.yml" "$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$final_path/drush/sites/$app.site.yml"
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$drush_aliasconfig"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$drush_aliasconfig"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$drush_aliasconfig"
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$drush_aliasconfig"
#=================================================
# INSTALL COMPOSER