easier running of create_subtheme.sh

Created on 11 August 2023, 11 months ago
Updated 14 August 2023, 11 months ago

Problem/Motivation

It would be easier if the create_subtheme.sh script were less rigid and could be run from anywhere.

Steps to reproduce

From the project root or web root, running the create_subtheme.sh script results in errors that give no clue as to the remedy. Only by reading the wiki page does one know how to run the script.

% bash web/themes/contrib/bootstrap_sass/scripts/create_subtheme.sh

+------------------------------------------------------------------------+
| With this script you could quickly create bootstrap_sass sub-theme     |
| In order to use this:                                                  |
| - bootstrap_sass theme (this folder) should be in the contrib folder   |
+------------------------------------------------------------------------+

The machine name of your custom theme? [e.g. mycustom_bootstrap_sass]
foo
Your theme name ? [e.g. My custom bootstrap_sass]
bar
cp: ../contrib/bootstrap_sass: No such file or directory
web/themes/contrib/bootstrap_sass/scripts/create_subtheme.sh: line 22: cd: foo: No such file or directory
mv: rename *bootstrap_sass.* to *foo.*: No such file or directory
mv: rename config/*/*bootstrap_sass.* to config/*/*foo.*: No such file or directory
rm: scripts/create_subtheme.sh: No such file or directory
sed: foo.info.yml: No such file or directory
# Check the themes/custom folder for your new sub-theme.

Proposed resolution

Make the script able to be run from anywhere. Include a note about the expected themes/contrib/bootstrap_sass structure.

✨ Feature request
Status

Active

Version

5.0

Component

Code

Created by

🇺🇸United States TommyK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @TommyK
  • @tommyk opened merge request.
  • 🇮🇳India ravi kant Jaipur

    I tried with the default create_subtheme.sh file using the latest version of this theme and the latest Drupal 10 version but it created a subtheme.
    I only got an error sed: RE error: illegal byte sequence but this is related to Mac OS so we can ignore it.
    I also tried enabling and compiling Sass for newly created sub-theme and the output is same as default theme.

Production build 0.69.0 2024