summaryrefslogtreecommitdiff
path: root/src/backend/sync.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
commited88746cd33c0f861e9c45bf05bf9e44d86089ba (patch)
treee6656f3d54bd738383d048c744d330dca2c15e4c /src/backend/sync.py
parent2d86cd9ddc5d9442e4a8e8fb50d72480a8293a4a (diff)
filesystem module : gather all the folder and file paths used by sisyphus under one module, and expose them to other modules from there
Diffstat (limited to 'src/backend/sync.py')
-rw-r--r--src/backend/sync.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/sync.py b/src/backend/sync.py
index b8fd91c..65afd2f 100644
--- a/src/backend/sync.py
+++ b/src/backend/sync.py
@@ -2,13 +2,10 @@
import os
import subprocess
-
-gentooEbuildDir = '/usr/ports/gentoo'
-redcoreEbuildDir = '/usr/ports/redcore'
-portageConfigDir = '/opt/redcore-build'
+import sisyphus.filesystem
def portage():
- os.chdir(gentooEbuildDir)
+ os.chdir(sisyphus.filesystem.gentooEbuildDir)
localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
remoteBranch = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '@{u}'])
@@ -18,7 +15,7 @@ def portage():
gitExecStage2.wait()
def overlay():
- os.chdir(redcoreEbuildDir)
+ os.chdir(sisyphus.filesystem.redcoreEbuildDir)
localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
remoteBranch = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '@{u}'])
@@ -28,7 +25,7 @@ def overlay():
gitExecStage2.wait()
def portageCfg():
- os.chdir(portageConfigDir)
+ os.chdir(sisyphus.filesystem.portageConfigDir)
localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
remoteBranch = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '@{u}'])