openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 48f40860feb9218f73024ea64243dd36089109da
parent a3bd9396810cc123dff7a7f3b3d019e2c3a8156f
Author: Jan Dankert <devnull@localhost>
Date:   Fri, 10 Nov 2017 22:40:39 +0100

Skript für Entwickler, um die Ausgabedateien von JS, CSS und Templates anzulegen und beschreibbar zu machen.

Diffstat:
script/create-output-files.sh | 38++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+), 0 deletions(-)

diff --git a/script/create-output-files.sh b/script/create-output-files.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# -- Only for OpenRat-Developers! -- +# +# Creating a minified/compiled version of CSS/LESS, JS and XML-Template files. +# Sets file permission bits to World-Readable that the CMS is able to write to these files! +# +# Do NOT use this in production environments! +# +# +echo "Start ("as `whoami` ")" +for jsfile in `find -name "*.js" -not -name "*.min.js"`; do + jsfile="${jsfile%.*}" + echo "JS found: $jsfile" + if [ ! -f $jsfile.min.js ]; then cp -v $jsfile.js $jsfile.min.js; + fi + chmod a+rw -v $jsfile.min.js; +done + + +for tplfile in `find -name "*.src.xml"`; do + + tplfile="${tplfile%.*}" + tplfile="${tplfile%.*}" + echo "Template found: $tplfile" + if [ ! -f $tplfile.out.php ]; then touch -d '2000-01-01' $tplfile.out.php; + fi + chmod a+rw -v $tplfile.out.php +done + +for lessfile in `find -name "*.less"`; do + lessfile="${lessfile%.*}" + echo "LESS found: $lessfile" + if [ ! -f $lessfile.min.css ]; then cp -v $lessfile.less $lessfile.min.css; + fi + chmod a+rw -v $lessfile.min.css +done+ \ No newline at end of file