Example #1
0
def untar(source, destination):
    # FIXME: make this silent
    if is_posix():
        subprocess.call(['tar', '-xvzf', source, '-C', destination])
    else:
        # FIXME: handle windows
        pass
Example #2
0
def main(config_func: Callable[[], DirectoryConfig]) -> None:
    config = config_func()
    if is_posix():
        mkdir(config.path, mode=config.mode)
        chown(config.path, config.user)
        chgrp(config.path, config.group)
    else:
        # FIXME: handle this
        pass