From 3a53fafee5f91a589497838c293328b155ca0764 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Thu, 30 May 2019 22:25:56 +0200 Subject: [PATCH] Remove the script to create sub themes, no use case. --- create_sub_theme.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 create_sub_theme.sh diff --git a/create_sub_theme.sh b/create_sub_theme.sh deleted file mode 100755 index 074d42f..0000000 --- a/create_sub_theme.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -# shell script hardening -set -euo pipefail - -# This script creates a new sub them from the zen base theme. -# (Run chmod 700 on this file to make it executable) - -if [[ ! -d "zen" || "${PWD##*/}" != "themes" ]]; then - echo "Error: This script must be run from the theme folder." - echo "Usage: ./zen/create_sub_theme.sh" -fi - -if [[ -z "${1-}" ]]; then - echo -n "Enter a human-readable subtheme name: " - read -e inputname -else - inputname="$1" -fi - -human=`echo $inputname | sed -e 's/"/\\"/g'` -themename=`echo $inputname | tr [:upper:] [:lower:] | sed -e 's/[\-\ ]/_/g' -e 's/[^a-z0-9_]//g'` - -mkdir "$themename" - -cp -p zen/.eslintrc zen/.gitignore zen/.sass-lint.yml $themename/ -cp -p zen/gulpfile.js zen/package-lock.json zen/package.json zen/theme.toml $themename/ -cp -pr zen/assets $themename/ -cp -pr zen/static $themename/ - -sed -e 's/^\(name = \).*$/\1"'"$human"'"/g' -e 's/^\(description = \).*$/\1"A Zen sub-theme"/g' $themename/theme.toml > $themename/theme.toml.temp -mv -f $themename/theme.toml.temp $themename/theme.toml