浏览代码

Added a temp script to move block theme folder locations

Jason Crist 3 年之前
父节点
当前提交
d930764808
共有 1 个文件被更改,包括 18 次插入0 次删除
  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	
+