From 67b54180c8e93b6fba312e4c75f416b832afbc6a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 6 Mar 2021 22:31:11 +0000 Subject: merge similar modules together --- src/backend/branchreset.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/backend/branchreset.py (limited to 'src/backend/branchreset.py') diff --git a/src/backend/branchreset.py b/src/backend/branchreset.py deleted file mode 100644 index 6df4347..0000000 --- a/src/backend/branchreset.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/python3 - -import animation -import os -import shutil -import sisyphus.filesystem - -@animation.wait('resetting branch configuration') -def start(): - 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) -- cgit v1.2.3