DOWNLOAD |
SOURCE CODE |
This tool attempt to provide a convenient way for finding bad references contained in any text files used by the Targetware engine to load a scenario.
mod_cleaner.sh is a simple bash script that runs on Linux (or any other Uniw-like systems) and MacOSX.
You can also make it run on Windows via the Cygwin environment.
The script parse all scenarios files included in the mod to be parsed and follows each external references in each files in the order it encounter it and finally display a complete report.
You can have look to the humble source code here.
Download the mod_cleaner.sh script and save it on your computer then set the
execution permission on it by typing in a terminal this command :
chmod +x /where/I/saved/mod_cleaner.sh
The mod_cleaner.sh script can accept some arguments as options :
To parse a mod directory, run this command :
/where/I/saved/mod_cleaner.sh /my/targetware/data my_mod.mod
where /my/targetware/data is the path to your Targetware data directory and my_mod.mod is the .mod file corresponding to the mod you want to be parsed.
Be patient while the script is running. Depending on your computer performances and number of files to be parsed, the script will take from
15 minutes to several hours ! Yes, you read right : Several hours !
Do not hesitate to go fishing ;-)
To display the included help, run this command :
/where/I/saved/mod_cleaner.sh --help
(The -h parameter is also allowed)
To display the last report, run this command :
/where/I/saved/mod_cleaner.sh --report
(The -r parameter is also allowed)
To display the mod_cleaner.sh version, run this command :
/where/I/saved/mod_cleaner.sh --version
(The -v parameter is also allowed)
You can look for some usefull log files in your system /tmp folder :
Other mod_cleaner.* files are not important and can be deleted.
Warning : Except while running with the -r, -h or -v option the mod_cleaner script will delete all these files at start.
In the following picture, you can see the mod_cleaner script while running :
In the following picture, you can see the mod_cleaner script while displaying report :
You can send me bug reports, questions or comments to doug.letough<at>free.fr (replace <at> by a valid @)