Add examples to the documentation

This commit is contained in:
Mathieu Comandon 2013-06-28 12:15:37 +02:00
parent a4f1f7692e
commit f03d145558
2 changed files with 43 additions and 9 deletions

View file

@ -69,6 +69,14 @@ directory.
The ``move`` command cannot overwrite files.
Example:
::
move:
src: game-file-id
dst: $GAMEDIR/location
Copying and merging directories
-------------------------------
@ -78,11 +86,38 @@ destination directory. When merging into an existing directory, original files
with the same as ones present in the merged directory will be overwritten, take
this into account when writing your script and order your actions accordingly.
Example:
::
merge:
src: game-file-id
dst: $GAMEDIR/location
Extracting archives
-------------------
Extracting archives is done with the ``extract`` directive, the ``file``
argument is a ``file id``.
argument is a ``file id``. If the archive should be extracted in some other
location than the ``$GAMEDIR``, you can specify a ``dst`` argument.
Example:
::
extract:
file: game-archive
dst: $GAMEDIR/datadir/
Making a file executable
------------------------
Marking the file as executable is done with the ``chmodx`` command. It is often
needed for games that ships in a zip file which does not retain file permissions.
Example: ``chmodx: $GAMEDIR/game_binary``
Calling the installer
=====================

View file

@ -210,7 +210,6 @@ class ScriptInterpreter(object):
if os.path.exists(dest_file):
logger.debug("Destination file exists")
if settings.KEEP_CACHED_ASSETS:
# Fast !
self.game_files[file_id] = dest_file
self.iter_game_files()
return