summaryrefslogtreecommitdiff
path: root/fixTexts.sh
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-09-30 09:02:14 +0400
committerAlexander Gavrilov2012-09-30 09:02:14 +0400
commit47e04863eb1bd04c1914afb2e354d65088e81e7c (patch)
tree339e9b7e855a4e73f9e48a9895d8fc8072893e48 /fixTexts.sh
parentbb39b2e45bdbe8fda2f99607e9ca56319a602843 (diff)
downloaddfhack-47e04863eb1bd04c1914afb2e354d65088e81e7c.tar.gz
dfhack-47e04863eb1bd04c1914afb2e354d65088e81e7c.tar.bz2
dfhack-47e04863eb1bd04c1914afb2e354d65088e81e7c.tar.xz
Stop fixTexts.sh from rebuilding html files that didn't change.
Diffstat (limited to 'fixTexts.sh')
-rwxr-xr-xfixTexts.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/fixTexts.sh b/fixTexts.sh
index 91719941..689dab8e 100755
--- a/fixTexts.sh
+++ b/fixTexts.sh
@@ -1,6 +1,17 @@
#!/bin/bash
+
+cd `dirname $0`
+
+function process() {
+ if [ "$1" -nt "$2" ]; then
+ rst2html "$1" "$2"
+ else
+ echo "$2 - up to date."
+ fi
+}
+
# this script is used for easy testing of the rst documentation files.
-rst2html Readme.rst Readme.html
-rst2html Compile.rst Compile.html
-rst2html Lua\ API.rst Lua\ API.html
-rst2html Contributors.rst > Contributors.html
+process Readme.rst Readme.html
+process Compile.rst Compile.html
+process Lua\ API.rst Lua\ API.html
+process Contributors.rst Contributors.html