[TW5] How to make on Mac Os X something like .bat file on windows?

96 views
Skip to first unread message

Siniy-Kit

unread,
Oct 18, 2016, 11:23:33 AM10/18/16
to TiddlyWiki
Hi! I have a little project on TW5. People can download my free tiddlywiki template http://heeg.ru/download.html and make static site with small on-line store.

For windows I make bat file to generate folder with static html pages and copy external images and other files to static folder


tiddlywiki --verbose  --load heeg.html --rendertiddlers [!is[system]![index]] $:/core/templates/static.tiddler.html ./static text/plain  --rendertiddler $:/_sitemap static/sitemap.xml text/vnd.tiddlywiki  --rendertiddler $:/theeg.template.css  static/static.css text/vnd.tiddlywiki --rendertiddler $:/_aa.giff/StyleSheetAnimate  static/animate.css text/vnd.tiddlywiki --rendertiddler $:/boot/Yandex_Metrika_Counter.js    static/Yandex_Metrika_Counter.js text/plain --rendertiddler $:/boot/bootprefix1.js   static/heeg.js text/plain  --setfield [[$:/HistoryList]] current-tiddler $:/_index text/vnd.tiddlywiki --output ./temp --rendertiddlers [[index]] $:/core/templates/static.tiddler.html ./static text/plain .html "noclean"  && ^
xcopy images output\static\images /s /e /C /Y /d /i && ^
xcopy fonts output\static\fonts /s /e /C /Y /d /i && ^
copy heeg.html output\static\ && ^
copy .\temp\static\index.html output\static\ && ^
copy .htaccess output\static\ && ^
copy favicon.ico output\static\ 


But people who have Mac Os X cant use my bat file to generate site.  may be somebody know how to create somethink like bat file but for Mac?

Message has been deleted

David Szego

unread,
Oct 19, 2016, 2:19:13 PM10/19/16
to TiddlyWiki
Bash shell, like Linux.
http://www.computerhope.com/unix/ucp.htm
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-2.html

filename is whatever.sh
Has to start with:
#!/bin/bash
on the first line, by itself.

"copy" is "cp"
/s = -R
/D = -u (couldn't find /d lowercase... did you mean /D uppercase?)
/e, /C, /Y = not needed
/i = couldn't find what it means...


sini-Kit

unread,
Oct 20, 2016, 8:33:52 AM10/20/16
to TiddlyWiki
Thank you David! And what about && ^ symbol? I use it not to write all code on one line. I can use it on mac too?

среда, 19 октября 2016 г., 21:19:13 UTC+3 пользователь David Szego написал:

Timothy Sanders

unread,
Oct 20, 2016, 12:10:30 PM10/20/16
to TiddlyWiki
Yes, && functions exactly the same. In fact, && was first used in UNIX, before it was in .bat files.
Reply all
Reply to author
Forward
0 new messages