summaryrefslogtreecommitdiff
path: root/src/scripts/js2h.sh
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2017-05-07 14:19:40 +0200
committerDaniel Carl <danielcarl@gmx.de>2017-05-07 14:19:40 +0200
commit746a74af99ef35af21d75432f1a1050dae0a3c7c (patch)
tree82af8d233f80861badaecae058a3f7f16d112d1d /src/scripts/js2h.sh
parentd33dfd31c148f9c82610e876f75fb16468d8d6c1 (diff)
Prefix minified content by file type.
Avoid naming collisions and prefix the minified scripts by JS_ so that it's obvious what's their content.
Diffstat (limited to 'src/scripts/js2h.sh')
-rwxr-xr-xsrc/scripts/js2h.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scripts/js2h.sh b/src/scripts/js2h.sh
index 4a76777..4a50c12 100755
--- a/src/scripts/js2h.sh
+++ b/src/scripts/js2h.sh
@@ -15,7 +15,7 @@ fi
# Remove the path and .js file extension and turn all chars to upper case to
# get the constant name.
-CONSTANT=$(echo "$FILE" | sed 's:.*/::g' | sed 's:.js$::g' | tr a-z A-Z)
+CONSTANT=$(echo "$FILE" | sed 's:.*/::g' | sed 's:^\(.*\).\(js\):\2_\1:g' | tr a-z A-Z)
# minify the script
cat $FILE | \