def subprocess_with_print(cmd, env=None, shell=False):
    if env is None:
        env = os.environ
    print('+ {0}'.format(subprocess.list2cmdline(cmd)) if isinstance(cmd, list) else cmd)
    subprocess.check_call(cmd, env=env, shell=shell)