Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make a file into a shell script and run it?
    primarykey
    data
    text
    <p>I created the file: </p> <pre><code>tinymce_compressor.sh $chmod +x tinymce_compressor.sh $ tinymce_compressor -bash: tinymce_compressor: command not found </code></pre> <p>How can I run this shell script in terminal?</p> <p>Here's the full script:</p> <pre><code>#!/bin/sh # Tinymce compressor shell script # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # (C) Copyright 2010 Gabor Vitez # # # Concatenates the tinymce components into a single static file # Can be used with any web server which can serve static files # Note you have to re-run this script every time you upgrade tinymce, # or change the required modules # # Usage: upon every invocation, the scipt will create a new # "tinymceappended.js" file, which contains the requested components # # In your html pages you have to change # # &lt;script type="text/javascript" src="&lt;your installation path&gt;/tiny_mce/tiny_mce.js"&gt;&lt;/script&gt; # # to # # &lt;script type="text/javascript" src="&lt;your compressed tinymce url&gt;/tinymceappended.js"&gt; &lt;/script&gt; # #config section #where does tinymce live in the filesystem? BASE="/Users/xxxx/Sites/cline/public/javascripts/tiny_mce/" #under which URLs do the original tinymce components show up? URLBASE="/tinymce" #just as in the javascript config section THEMES="advanced" PLUGINS="safari spellchecker pagebreak style layer save advhr advimage advlink emotions iespell inlinepopups insertdatetime preview media searchreplace contextmenu paste directionality fullscreen noneditable visualchars nonbreaking xhtmlxtras" LANGUAGES="en" #end config section ( LOADED="" cd $BASE || exit 1 #cat tiny_mce.js sed "s/tinymce._init();/tinymce.baseURL='\/tinymce';tinymce._init();/"&lt;tiny_mce.js #echo "tinyMCE_GZ.start();" #cat tiny_mce_popup.js &amp;&amp; LOADED="$LOADED $URLBASE/tiny_mce_popup.js" for lang in $LANGUAGES do cat langs/$lang.js &amp;&amp; LOADED="$LOADED $URLBASE/langs/$lang.js" done for theme in $THEMES do cat themes/$theme/editor_template.js &amp;&amp; LOADED="$LOADED $URLBASE/themes/$theme/editor_template.js" for lang in $LANGUAGES do cat themes/$theme/langs/$lang.js &amp;&amp; LOADED="$LOADED $URLBASE/themes/$theme/langs/$lang.js" done done for plugin in $PLUGINS do cat plugins/$plugin/editor_plugin.js &amp;&amp; LOADED="$LOADED $URLBASE/plugins/$plugin/editor_plugin.js" for lang in $LANGUAGES do cat plugins/$plugin/langs/$lang.js &amp;&amp; LOADED="$LOADED $URLBASE/plugins/$plugin/langs/$lang.js" done done echo #echo $LOADED &gt;&amp;2 for i in $LOADED do echo "tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(\"$i\"));" done #echo "tinyMCE_GZ.end();" ) &gt;tinymceappended.js </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload