| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | [scip-shell system . . `[`. -r frei0r-meta ] || gmakescip-shell system . . gmake. |
| 4 | tmp=`mktempscip-shell system . . mktemp.` |
| 5 | findscip-shell system . . find. "${2}" -name "*.$1" | |
| 6 | while read -r line; do |
| 7 | file=`basenamescip-shell system . . basename. $line` |
| 8 | dir=`dirnamescip-shell system . . dirname. $line` |
| 9 | name=`echoscip-shell system . . echo. $file | cutscip-shell system . . cut. -d. -f1` |
| 10 | ./frei0r-meta "$line" > $tmp |
| 11 | mvscip-shell system . . mv. $tmp "$dir/$name.json" |
| 12 | lsscip-shell system . . ls. "$dir/$name.json" |
| 13 | done |
| 14 | rmscip-shell system . . rm. -f $tmp |