summaryrefslogtreecommitdiff
path: root/src/backend/check.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/check.py
parent0cf2c9f8ec52b1ae276c1573210d252ab0c4577b (diff)
rearrange the backend
Diffstat (limited to 'src/backend/check.py')
-rw-r--r--src/backend/check.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/backend/check.py b/src/backend/check.py
deleted file mode 100644
index 7f23338..0000000
--- a/src/backend/check.py
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/python3
-
-import os
-import subprocess
-import sisyphus.binhost
-import sisyphus.filesystem
-
-def root():
- return True if os.getuid() == 0 else False
-
-def branch():
- activeBranch = None
-
- if os.path.isdir(os.path.join(sisyphus.filesystem.portageRepoDir, '.git')):
- os.chdir(sisyphus.filesystem.portageRepoDir)
- localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
-
- if localBranch.decode().strip() == 'master':
- activeBranch = str('master')
-
- if localBranch.decode().strip() == 'next':
- activeBranch = str('next')
-
- return activeBranch
-
-def sanity():
- activeBranch = branch()
- isBinhost = sisyphus.binhost.start()
- isSane = int()
-
- if "packages-next" in isBinhost:
- if activeBranch == "next":
- isSane = int(1)
- else:
- isSane = int(0)
- else:
- if activeBranch == "master":
- isSane = int(1)
- else:
- isSane = int(0)
-
- return isSane