webmcp
diff framework/bin/recursive-luac @ 0:9fdfb27f8e67
Version 1.0.0
author | jbe/bsw |
---|---|
date | Sun Oct 25 12:00:00 2009 +0100 (2009-10-25) |
parents | |
children | 30391b40722f |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/bin/recursive-luac Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +#!/bin/sh 1.5 +src=$1 1.6 +dst=$2 1.7 +if [ "$src" = "" -o "$dst" = "" ] 1.8 +then 1.9 + echo "Usage: recursive-luac <source-dir> <destination-dir>" 1.10 + exit 1 1.11 +fi 1.12 +cp -RL "$src" "$dst" 1.13 +# TODO: handle whitespace in directory or file names correctly 1.14 +for file in `find "$dst" -name '*.lua'` 1.15 +do 1.16 + luac -s -o "$file" "$file" 1.17 +done