Skip to content

Commit

Permalink
protect against jsdog not being found during builds
Browse files Browse the repository at this point in the history
  • Loading branch information
psema4 committed Oct 25, 2011
1 parent 5f33107 commit 2a2eacf
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 39 deletions.
41 changes: 23 additions & 18 deletions prototype/scripts/bin/build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

echo "- concat"
echo "- merging wash commands"
cat "cat.js" \
"cd.js" \
"clear.js" \
Expand All @@ -18,22 +18,27 @@ cat "cat.js" \
> "atomos-bin.js"

#docs
echo "- docs"
DOCNGN=`which jsdog`
DOCDIR="../docs/wash-commands"
DOCTMPL="-m ../docs/jsdog.jade"

$DOCNGN $DOCTMPL -s cat.js -t t/cat.js > $DOCDIR/cat.html
$DOCNGN $DOCTMPL -s cd.js -t t/cd.js > $DOCDIR/cd.html
$DOCNGN $DOCTMPL -s clear.js -t t/clear.js > $DOCDIR/clear.html
$DOCNGN $DOCTMPL -s commands.js -t t/commands.js > $DOCDIR/commands.html
$DOCNGN $DOCTMPL -s echo.js -t t/echo.js > $DOCDIR/echo.html
$DOCNGN $DOCTMPL -s edit.js -t t/edit.js > $DOCDIR/edit.html
$DOCNGN $DOCTMPL -s help.js -t t/help.js > $DOCDIR/help.html
$DOCNGN $DOCTMPL -s ls.js -t t/ls.js > $DOCDIR/ls.html
$DOCNGN $DOCTMPL -s mkdir.js -t t/mkdir.js > $DOCDIR/mkdir.html
$DOCNGN $DOCTMPL -s pwd.js -t t/pwd.js > $DOCDIR/pwd.html
$DOCNGN $DOCTMPL -s rmdir.js -t t/rmdir.js > $DOCDIR/rmdir.html
$DOCNGN $DOCTMPL -s rm.js -t t/rm.js > $DOCDIR/rm.html
$DOCNGN $DOCTMPL -s touch.js -t t/touch.js > $DOCDIR/touch.html
$DOCNGN $DOCTMPL -s wallpaper.js -t t/wallpaper.js > $DOCDIR/wallpaper.html
if [ -n "$DOCNGN" ]
then
echo " - building documentation and unit tests"

DOCDIR="../docs/wash-commands"
DOCTMPL="-m ../docs/jsdog.jade"

$DOCNGN $DOCTMPL -s cat.js -t t/cat.js > $DOCDIR/cat.html
$DOCNGN $DOCTMPL -s cd.js -t t/cd.js > $DOCDIR/cd.html
$DOCNGN $DOCTMPL -s clear.js -t t/clear.js > $DOCDIR/clear.html
$DOCNGN $DOCTMPL -s commands.js -t t/commands.js > $DOCDIR/commands.html
$DOCNGN $DOCTMPL -s echo.js -t t/echo.js > $DOCDIR/echo.html
$DOCNGN $DOCTMPL -s edit.js -t t/edit.js > $DOCDIR/edit.html
$DOCNGN $DOCTMPL -s help.js -t t/help.js > $DOCDIR/help.html
$DOCNGN $DOCTMPL -s ls.js -t t/ls.js > $DOCDIR/ls.html
$DOCNGN $DOCTMPL -s mkdir.js -t t/mkdir.js > $DOCDIR/mkdir.html
$DOCNGN $DOCTMPL -s pwd.js -t t/pwd.js > $DOCDIR/pwd.html
$DOCNGN $DOCTMPL -s rmdir.js -t t/rmdir.js > $DOCDIR/rmdir.html
$DOCNGN $DOCTMPL -s rm.js -t t/rm.js > $DOCDIR/rm.html
$DOCNGN $DOCTMPL -s touch.js -t t/touch.js > $DOCDIR/touch.html
$DOCNGN $DOCTMPL -s wallpaper.js -t t/wallpaper.js > $DOCDIR/wallpaper.html
fi
3 changes: 3 additions & 0 deletions prototype/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cd ..

#TODO zepto.eof.txt should not be required, check minifier & zepto issues on github

echo "- merging dependencies and wash commands into system"
cat "vendor/zepto.min.js" \
"zepto.eof.txt" \
"vendor/ejohn-class.js" \
Expand All @@ -18,6 +19,8 @@ cat "vendor/zepto.min.js" \
"hx/atomos-hx.js" \
> "atomos.t.js"

echo "- adding main"
cat "atomos.t.js" "main.js" > "atomos.js"

echo "- minimizing"
uglifyjs -o atomos.min.js atomos.js
2 changes: 1 addition & 1 deletion prototype/scripts/docs/classes/file.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
</p><br><span>Parameters:</span><ol class="params"><li><i>Object</i>&nbsp;
<b>opts</b>&nbsp;
Options dictionary
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.002 seconds
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.003 seconds
</p></div></div><div id="test-container" style="display: none;"><h1 id="qunit-header">file.js</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol></div><div id="src-container" style="display: none;"><pre class="brush: js">/* file.js
*
* ++[black[Atomic OS Class: HxFile]++
Expand Down
2 changes: 1 addition & 1 deletion prototype/scripts/docs/classes/guid.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</p></div><div id="block1" class="block"><b style="font-size: 20pt;">next&nbsp;-&nbsp;</b><i> next: function() </i><p style="color: #777;">Generates a GUID. <b>WARNING:</b> Does not check if ID already in use<br />
</p><br><span>Returns:</span><ol class="returns"><li><i>String</i>&nbsp;
GUID
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.003 seconds
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.002 seconds
</p></div></div><div id="test-container" style="display: none;"><h1 id="qunit-header">guid.js</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol></div><div id="src-container" style="display: none;"><pre class="brush: js">/* guid.js
*
* ++[black[Atomic OS Class: HxGUID] **Singleton**++
Expand Down
2 changes: 1 addition & 1 deletion prototype/scripts/docs/classes/jsfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
Name of file to delete
</li></ol><br><span>Returns:</span><ol class="returns"><li><i>Bool</i>&nbsp;
True on success
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.005 seconds
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.004 seconds
</p></div></div><div id="test-container" style="display: none;"><h1 id="qunit-header">jsfs.js</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol></div><div id="src-container" style="display: none;"><pre class="brush: js">/* jsfs.js
*
* ++[black[Atomic OS Class: HxJSFS]++
Expand Down
2 changes: 1 addition & 1 deletion prototype/scripts/docs/wash-commands/commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
</p><br><span>Parameters:</span><ol class="params"><li><i>Array</i>&nbsp;
<b>args</b>&nbsp;
A list of arguments the command was called with
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.004 seconds
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.003 seconds
</p></div></div><div id="test-container" style="display: none;"><h1 id="qunit-header">commands.js</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol></div><div id="src-container" style="display: none;"><pre class="brush: js">/* commands.js
*
* Atomic OS WASH command
Expand Down
2 changes: 1 addition & 1 deletion prototype/scripts/docs/wash-commands/echo.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
</p><br><span>Parameters:</span><ol class="params"><li><i>Array</i>&nbsp;
<b>args</b>&nbsp;
A list of arguments the command was called with
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.004 seconds
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.003 seconds
</p></div></div><div id="test-container" style="display: none;"><h1 id="qunit-header">echo.js</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol></div><div id="src-container" style="display: none;"><pre class="brush: js">/* echo.js
*
* Atomic OS WASH command
Expand Down
2 changes: 1 addition & 1 deletion prototype/scripts/docs/wash-commands/rm.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
</p><br><span>Parameters:</span><ol class="params"><li><i>Array</i>&nbsp;
<b>args</b>&nbsp;
A list of arguments the command was called with
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.003 seconds
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.004 seconds
</p></div></div><div id="test-container" style="display: none;"><h1 id="qunit-header">rm.js</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol></div><div id="src-container" style="display: none;"><pre class="brush: js">/* rm.js
*
* Atomic OS WASH command
Expand Down
2 changes: 1 addition & 1 deletion prototype/scripts/docs/wash-commands/wallpaper.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
</p><br><span>Parameters:</span><ol class="params"><li><i>Array</i>&nbsp;
<b>args</b>&nbsp;
A list of arguments the command was called with
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.004 seconds
</li></ol></div><div id="footer"><p>Generated by&nbsp;<a href="http://github.com/psema4/jsdog">JSDog</a>&nbsp;in about 0.003 seconds
</p></div></div><div id="test-container" style="display: none;"><h1 id="qunit-header">wallpaper.js</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol></div><div id="src-container" style="display: none;"><pre class="brush: js">/* wallpaper.js
*
* Atomic OS WASH command
Expand Down
33 changes: 19 additions & 14 deletions prototype/scripts/hx/build
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

echo "- creating core system"

cat "class.js" \
"guid.js" \
"bus.js" \
Expand All @@ -17,20 +19,23 @@ cat "class.js" \
> "atomos-hx.js"

#docs
echo "- docs"
DOCNGN=`which jsdog`
DOCDIR="../docs/classes"
DOCTMPL="-m ../docs/jsdog.jade"

$DOCNGN $DOCTMPL -s class.js -t t/class.js > $DOCDIR/class.html
$DOCNGN $DOCTMPL -s guid.js -t t/guid.js > $DOCDIR/guid.html
$DOCNGN $DOCTMPL -s bus.js -t t/bus.js > $DOCDIR/bus.html
$DOCNGN $DOCTMPL -s stream.js -t t/stream.js > $DOCDIR/stream.html
$DOCNGN $DOCTMPL -s file.js -t t/file.js > $DOCDIR/file.html
$DOCNGN $DOCTMPL -s jsfs.js -t t/jsfs.js > $DOCDIR/jsfs.html
$DOCNGN $DOCTMPL -s domfs.js -t t/domfs.js > $DOCDIR/domfs.html
$DOCNGN $DOCTMPL -s process.js -t t/process.js > $DOCDIR/process.html
$DOCNGN $DOCTMPL -s wash.js -t t/wash.js > $DOCDIR/wash.html
$DOCNGN $DOCTMPL -s panel.js -t t/panel.js > $DOCDIR/panel.html
$DOCNGN $DOCTMPL -s window.js -t t/window.js > $DOCDIR/window.html
if [ -n "$DOCNGN" ]
then
echo " - building documentation and unit tests"
DOCDIR="../docs/classes"
DOCTMPL="-m ../docs/jsdog.jade"

$DOCNGN $DOCTMPL -s class.js -t t/class.js > $DOCDIR/class.html
$DOCNGN $DOCTMPL -s guid.js -t t/guid.js > $DOCDIR/guid.html
$DOCNGN $DOCTMPL -s bus.js -t t/bus.js > $DOCDIR/bus.html
$DOCNGN $DOCTMPL -s stream.js -t t/stream.js > $DOCDIR/stream.html
$DOCNGN $DOCTMPL -s file.js -t t/file.js > $DOCDIR/file.html
$DOCNGN $DOCTMPL -s jsfs.js -t t/jsfs.js > $DOCDIR/jsfs.html
$DOCNGN $DOCTMPL -s domfs.js -t t/domfs.js > $DOCDIR/domfs.html
$DOCNGN $DOCTMPL -s process.js -t t/process.js > $DOCDIR/process.html
$DOCNGN $DOCTMPL -s wash.js -t t/wash.js > $DOCDIR/wash.html
$DOCNGN $DOCTMPL -s panel.js -t t/panel.js > $DOCDIR/panel.html
$DOCNGN $DOCTMPL -s window.js -t t/window.js > $DOCDIR/window.html
fi

0 comments on commit 2a2eacf

Please sign in to comment.