From af8c6e002b0fc919092c4229e70dcf87c13540cf Mon Sep 17 00:00:00 2001
From: Rajab Natshah <rajabn@gmail.com>
Date: Tue, 20 Mar 2018 13:47:51 +0200
Subject: [PATCH] Issue #2900926: Fixed issues on the Vartheme sub theme
 generator scripts for a project using command line works for RTL option but
 does not for LTR

---
 scripts/create-new-vartheme.sh          | 14 +++++++-------
 scripts/create-new-vartheme_material.sh | 19 ++++++++++---------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/scripts/create-new-vartheme.sh b/scripts/create-new-vartheme.sh
index ffde8c81..7cb6c635 100644
--- a/scripts/create-new-vartheme.sh
+++ b/scripts/create-new-vartheme.sh
@@ -155,18 +155,18 @@ if [[ ! -d "$theme_path/$theme_name" ]]; then
   mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_messages.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_messages.yml
   mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_page_title.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_page_title.yml
   mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_socialauthlogin.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_socialauthlogin.yml
-  mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_views_block__varbase_heroslider_media_varbase_heroslider_media.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_views_block__varbase_heroslider_media_varbase_heroslider_media.yml 
+  mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_SUBTHEME_views_block__varbase_heroslider_media_varbase_heroslider_media.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_views_block__varbase_heroslider_media_varbase_heroslider_media.yml
 
   # 7.2 Rename the extentions of TWIG template files.
   # html.html.twig is very important and needed file for RTL websites.
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/system/html.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/system/html.html.twig
+  mv ${theme_path}/${theme_name}/templates/system/html.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/system/html.html.twig
 
   # Custom Better Login templates for edit, login, rest password, and register template files.
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--edit.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--edit.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--login.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--login.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--password.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--password.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--register.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--register.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--reset.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_SUBTHEME/templates/betterlogin/page--user--reset.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig-VARTHEME_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig
 
   # 8.  Rename VARTHEME_SUBTHEME.base.css files.
   mv ${theme_path}/${theme_name}/css/base/VARTHEME_SUBTHEME.base.css ${theme_path}/${theme_name}/css/base/${theme_name}.base.css
diff --git a/scripts/create-new-vartheme_material.sh b/scripts/create-new-vartheme_material.sh
index 376bc948..7726f78e 100644
--- a/scripts/create-new-vartheme_material.sh
+++ b/scripts/create-new-vartheme_material.sh
@@ -155,18 +155,19 @@ if [[ ! -d "$theme_path/$theme_name" ]]; then
   mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_messages.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_messages.yml
   mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_page_title.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_page_title.yml
   mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_socialauthlogin.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_socialauthlogin.yml
-  mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_views_block__varbase_heroslider_media_varbase_heroslider_media.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_views_block__varbase_heroslider_media_varbase_heroslider_media.yml 
+  mv ${theme_path}/${theme_name}/config/optional/block.block.VARTHEME_MATERIAL_SUBTHEME_views_block__varbase_heroslider_media_varbase_heroslider_media.yml ${theme_path}/${theme_name}/config/optional/block.block.${theme_name}_views_block__varbase_heroslider_media_varbase_heroslider_media.yml
 
   # 7.2 Rename the extentions of TWIG template files.
   # html.html.twig is very important and needed file for RTL websites.
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/system/html.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/system/html.html.twig
-
-  # Custom Better Login templates for edit, login, rest password, and register template files. 
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--edit.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--edit.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--login.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--login.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--password.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--password.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--register.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--register.html.twig
-  mv ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--reset.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/VARTHEME_MATERIAL_SUBTHEME/templates/betterlogin/page--user--reset.html.twig
+  mv ${theme_path}/${theme_name}/templates/system/html.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/system/html.html.twig
+
+  # Custom Better Login templates for edit, login, rest password, and register template files.
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--edit.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--login.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--password.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--register.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/page--user--reset.html.twig
+  mv ${theme_path}/${theme_name}/templates/betterlogin/block--social-auth.html.twig-VARTHEME_MATERIAL_SUBTHEME ${theme_path}/${theme_name}/templates/betterlogin/block--social-auth.html.twig
 
 
   # 8.  Rename VARTHEME_MATERIAL_SUBTHEME.base.css files.
-- 
GitLab