#!/usr/bin/env python """ this is a mock tar command written to provide portability to non-unix platforms that don't have the tar command. It uses tarfile to replace the very baseline functionality used within the in-toto test suite. You will probably find a couple of tests decorated as follows: @mock.patch.dict(os.environ, $PATH_TO_THIS FOLDER) def test_that_requires_to_execute_tar(...) ... This will automatically make it so that in-toto popens this tar executable instead of the system's tar. This script is *not* meant to do thorough checking of its inputs, so use it with care. Santiago Torres-Arias 1527623020 """ import sys import tarfile tarfile.open(sys.argv[2], "r:*").extractall() sys.exit(0)