From 02b654dc089c570ce81ce5da0c2c48d5d21d3cb8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Oct 2022 14:26:52 +0000 Subject: move getEnvironment -> getenv --- src/backend/checkEnvironment.py | 42 ----------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 src/backend/checkEnvironment.py (limited to 'src/backend/checkEnvironment.py') diff --git a/src/backend/checkEnvironment.py b/src/backend/checkEnvironment.py deleted file mode 100644 index 9613fe6..0000000 --- a/src/backend/checkEnvironment.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/python3 - -import os -import subprocess -import sisyphus.getEnvironment -import sisyphus.getFilesystem - -def root(): - return True if os.getuid() == 0 else False - -def branch(): - activeBranch = None - - if os.path.isdir(os.path.join(sisyphus.getFilesystem.gentooRepoDir, '.git')): - os.chdir(sisyphus.getFilesystem.gentooRepoDir) - 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() - binhostURL = sisyphus.getEnvironment.binhostURL() - isSane = int() - - if "packages-next" in binhostURL: - if activeBranch == "next": - isSane = int(1) - else: - isSane = int(0) - else: - if activeBranch == "master": - isSane = int(1) - else: - isSane = int(0) - - return isSane -- cgit v1.2.3