mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-17 12:20:59 +02:00
pentoo-system: a better ungit from floppym
This commit is contained in:
parent
f498566e59
commit
377edaba17
2 changed files with 11 additions and 8 deletions
|
|
@ -1,8 +1,11 @@
|
|||
#!/bin/sh
|
||||
PORTDIR=$(portageq envvar get_repo_path 2> /dev/null)
|
||||
if [ -z "${PORTDIR}" ]; then
|
||||
PORTDIR=$(portageq envvar PORTDIR 2> /dev/null)
|
||||
fi
|
||||
if [ -d "${PORTDIR}"/.git ]; then
|
||||
rm -rf "${PORTDIR}"/.git
|
||||
fi
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os.path
|
||||
import portage
|
||||
import shutil
|
||||
|
||||
repo = portage.db['/']['vartree'].settings.repositories['gentoo']
|
||||
git = os.path.join(repo.location, '.git')
|
||||
|
||||
if repo.sync_type != 'git' and os.path.exists(git):
|
||||
shutil.rmtree(git)
|
||||
|
|
|
|||
Loading…
Reference in a new issue