Version 1
[yaffs-website] / web / core / scripts / js / rename-js-files-to-es6.sh
diff --git a/web/core/scripts/js/rename-js-files-to-es6.sh b/web/core/scripts/js/rename-js-files-to-es6.sh
new file mode 100644 (file)
index 0000000..5ae2a89
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Rename *.js files in *.es6.js. Only need to be run once.
+# Should be removed after *.es6.js files are committed to core.
+#
+# @internal This file is part of the core javascript build process and is only
+# meant to be used in that context.
+
+for js in `find ./{misc,modules,themes} -name '*.js'`;
+do
+   mv ${js} ${js%???}.es6.js;
+done