( directory)
| 278 | |
| 279 | |
| 280 | def _git_get_branch( directory): |
| 281 | command = f'cd {directory} && git branch --show-current' |
| 282 | log( f'Running: {command}') |
| 283 | p = subprocess.run( |
| 284 | command, |
| 285 | shell=True, |
| 286 | check=False, |
| 287 | text=True, |
| 288 | stdout=subprocess.PIPE, |
| 289 | ) |
| 290 | ret = None |
| 291 | if p.returncode == 0: |
| 292 | ret = p.stdout.strip() |
| 293 | log( f'Have found MuPDF git branch: ret={ret!r}') |
| 294 | return ret |
| 295 | |
| 296 | |
| 297 | def tar_check(path, mode='r:gz', prefix=None, remove=False): |