webmcp
view framework/bin/recursive-luac @ 351:b1748c6c3c89
extos.stat(...) returns false (instead of nil) if file does not exist; Added extos.lstat(...) and extos.fstat(...)
| author | jbe | 
|---|---|
| date | Thu Mar 26 16:38:30 2015 +0100 (2015-03-26) | 
| parents | 30391b40722f | 
| children | 
 line source
     1 #!/bin/sh
     2 luacbin=$1
     3 src=$2
     4 dst=$3
     5 if [ "$src" = "" -o "$dst" = "" ]
     6 then
     7   echo "Usage:  recursive-luac <luac-binary> <source-dir> <destination-dir>"
     8   exit 1
     9 fi
    10 cp -RL "$src" "$dst"
    11 # TODO: handle whitespace in directory or file names correctly
    12 for file in `find "$dst" -name '*.lua'`
    13 do
    14   $1 -s -o "$file" "$file"
    15 done
