def clone_bench_repo(args):
 if os.path.exists(tmp_bench_repo):
  return 0
 elif args.without_bench_setup:
  clone_path = os.path.join(os.path.expanduser('~'), 'bench')
 else:
  clone_path = tmp_bench_repo
 branch = (args.bench_branch or 'master')
 repo_url = (args.repo_url or 'https://github.com/frappe/bench')
 success = run_os_command({'git': 'git clone {repo_url} {bench_repo} --depth 1 --branch {branch}'.format(repo_url=repo_url, bench_repo=clone_path, branch=branch)})
 return success

def clone_bench_repo ( args ) : if os . path . exists ( tmp_bench_repo ) : return 0 elif args . without_bench_setup : clone_path = os . path . join ( os . path . expanduser ( '~' ) , 'bench' ) else : clone_path = tmp_bench_repo branch = ( args . bench_branch or 'master' ) repo_url = ( args . repo_url or 'https://github.com/frappe/bench' ) success = run_os_command ( { 'git' : 'git clone {repo_url} {bench_repo} --depth 1 --branch {branch}' . format ( repo_url = repo_url , bench_repo = clone_path , branch = branch ) } ) return success
clones the bench repository in the user folder .