

def install_in_directory(directory, command):
    'Execute a certain command while staying inside one directory.\n\n    :param directory: (~str) Path of directory in which installation command has to be executed.\n    :param command: (~str) Linux shell command (most likely `wget` here)\n\n    :return: True - if installation successful or directory already exists, and False if not.\n    '
    if create_directory(directory):
        Colorizer.info(('[*] Switching to %s' % directory))
        os.chdir(directory)
        return run_command(directory)
    else:
        Colorizer.warning(('[!] Directory %s already exists, so skipping installation for this' % directory))
        return True

dataset/ETHPy150Open owtf/owtf/install/install.py install_in_directory/VarMisuse@43/186 `command`->`directory`