Browse Source

Added a temp script to move block theme folder locations

Jason Crist 3 years ago
parent
commit
d930764808
1 changed files with 18 additions and 0 deletions
  1. 18 0
      move-block-template-folders.sh

+ 18 - 0
move-block-template-folders.sh

@@ -0,0 +1,18 @@
+#!/bin/zsh
+
+# This is a temporary script used to transition all block theme folders from the old format to the new
+# /block-template-parts -> /parts
+# /block-templates -> /templates
+
+for theme in */ ; do
+
+	if test -d "./${theme}/block-template-parts"; then
+		mv "./${theme}/block-template-parts" "./${theme}/parts"
+	fi
+
+	if test -d "./${theme}/block-templates"; then
+		mv "./${theme}/block-templates" "./${theme}/templates"
+	fi
+
+done	
+