summaryrefslogtreecommitdiff
path: root/src/backend/purge.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-17 19:12:53 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-17 19:12:53 +0100
commite1562a71d6483021d332bccbfc5a3086688bc58c (patch)
tree6be3d468e0aadd6c4de6c4dbd7a58ebe9fd59cbb /src/backend/purge.py
parent0cf2c9f8ec52b1ae276c1573210d252ab0c4577b (diff)
rearrange the backend
Diffstat (limited to 'src/backend/purge.py')
-rw-r--r--src/backend/purge.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/backend/purge.py b/src/backend/purge.py
deleted file mode 100644
index 3a94cff..0000000
--- a/src/backend/purge.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/python3
-
-import animation
-import os
-import shutil
-import sisyphus.filesystem
-
-@animation.wait('purging branch configuration')
-def branch():
- if os.path.isdir(sisyphus.filesystem.portageRepoDir):
- for files in os.listdir(sisyphus.filesystem.portageRepoDir):
- if os.path.isfile(os.path.join(sisyphus.filesystem.portageRepoDir, files)):
- os.remove(os.path.join(sisyphus.filesystem.portageRepoDir, files))
- else:
- shutil.rmtree(os.path.join(sisyphus.filesystem.portageRepoDir, files))
- else:
- os.makedirs(sisyphus.filesystem.portageRepoDir)
-
- if os.path.isdir(sisyphus.filesystem.redcoreRepoDir):
- for files in os.listdir(sisyphus.filesystem.redcoreRepoDir):
- if os.path.isfile(os.path.join(sisyphus.filesystem.redcoreRepoDir, files)):
- os.remove(os.path.join(sisyphus.filesystem.redcoreRepoDir, files))
- else:
- shutil.rmtree(os.path.join(sisyphus.filesystem.redcoreRepoDir, files))
- else:
- os.makedirs(sisyphus.filesystem.redcoreRepoDir)
-
- if os.path.isdir(sisyphus.filesystem.portageConfigDir):
- for files in os.listdir(sisyphus.filesystem.portageConfigDir):
- if os.path.isfile(os.path.join(sisyphus.filesystem.portageConfigDir, files)):
- os.remove(os.path.join(sisyphus.filesystem.portageConfigDir, files))
- else:
- shutil.rmtree(os.path.join(sisyphus.filesystem.portageConfigDir, files))
- else:
- os.makedirs(sisyphus.filesystem.portageConfigDir)
-
-def cache():
- if os.path.isdir(sisyphus.filesystem.portageCacheDir):
- for files in os.listdir(sisyphus.filesystem.portageCacheDir):
- if os.path.isfile(os.path.join(sisyphus.filesystem.portageCacheDir, files)):
- os.remove(os.path.join(sisyphus.filesystem.portageCacheDir, files))
- else:
- shutil.rmtree(os.path.join(sisyphus.filesystem.portageCacheDir, files))
-
-def metadata():
- if os.path.isdir(sisyphus.filesystem.portageMetadataDir):
- for files in os.listdir(sisyphus.filesystem.portageMetadataDir):
- if os.path.isfile(os.path.join(sisyphus.filesystem.portageMetadataDir, files)):
- os.remove(os.path.join(sisyphus.filesystem.portageMetadataDir, files))
- else:
- shutil.rmtree(os.path.join(sisyphus.filesystem.portageMetadataDir, files))