diff options
Diffstat (limited to 'src/backend/branchmaster.py')
-rw-r--r-- | src/backend/branchmaster.py | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/backend/branchmaster.py b/src/backend/branchmaster.py index 6229511..6a114c5 100644 --- a/src/backend/branchmaster.py +++ b/src/backend/branchmaster.py @@ -3,15 +3,12 @@ import animation import os import subprocess - -gentooEbuildDir = '/usr/ports/gentoo' -redcoreEbuildDir = '/usr/ports/redcore' -portageConfigDir = '/opt/redcore-build' +import sisyphus.filesystem @animation.wait('injecting gentoo linux portage tree - branch master') def setGitlabMasterStage1(): - if not os.path.isdir(os.path.join(gentooEbuildDir, '.git')): - os.chdir(gentooEbuildDir) + if not os.path.isdir(os.path.join(sisyphus.filesystem.gentooEbuildDir, '.git')): + os.chdir(sisyphus.filesystem.gentooEbuildDir) subprocess.call(['git', 'init', '-q']) subprocess.call(['git', 'remote', 'add', 'origin', 'https://gitlab.com/redcore/portage.git']) subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet']) @@ -19,8 +16,8 @@ def setGitlabMasterStage1(): @animation.wait('injecting redcore linux ebuild tree - branch master') def setGitlabMasterStage2(): - if not os.path.isdir(os.path.join(redcoreEbuildDir, '.git')): - os.chdir(redcoreEbuildDir) + if not os.path.isdir(os.path.join(sisyphus.filesystem.redcoreEbuildDir, '.git')): + os.chdir(sisyphus.filesystem.redcoreEbuildDir) subprocess.call(['git', 'init', '-q']) subprocess.call(['git', 'remote', 'add', 'origin', 'https://gitlab.com/redcore/redcore-desktop.git']) subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet']) @@ -28,8 +25,8 @@ def setGitlabMasterStage2(): @animation.wait('injecting redcore linux portage configuration - branch master') def setGitlabMasterStage3(): - if not os.path.isdir(os.path.join(portageConfigDir, '.git')): - os.chdir(portageConfigDir) + if not os.path.isdir(os.path.join(sisyphus.filesystem.portageConfigDir, '.git')): + os.chdir(sisyphus.filesystem.portageConfigDir) subprocess.call(['git', 'init', '-q']) subprocess.call(['git', 'remote', 'add', 'origin', 'https://gitlab.com/redcore/redcore-build.git']) subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet']) @@ -42,8 +39,8 @@ def gitlabStart(): @animation.wait('injecting gentoo linux portage tree - branch master') def setPagureMasterStage1(): - if not os.path.isdir(os.path.join(gentooEbuildDir, '.git')): - os.chdir(gentooEbuildDir) + if not os.path.isdir(os.path.join(sisyphus.filesystem.gentooEbuildDir, '.git')): + os.chdir(sisyphus.filesystem.gentooEbuildDir) subprocess.call(['git', 'init', '-q']) subprocess.call(['git', 'remote', 'add', 'origin', 'https://pagure.io/redcore/portage.git']) subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet']) @@ -51,8 +48,8 @@ def setPagureMasterStage1(): @animation.wait('injecting redcore linux ebuild tree - branch master') def setPagureMasterStage2(): - if not os.path.isdir(os.path.join(redcoreEbuildDir, '.git')): - os.chdir(redcoreEbuildDir) + if not os.path.isdir(os.path.join(sisyphus.filesystem.redcoreEbuildDir, '.git')): + os.chdir(sisyphus.filesystem.redcoreEbuildDir) subprocess.call(['git', 'init', '-q']) subprocess.call(['git', 'remote', 'add', 'origin', 'https://pagure.io/redcore/redcore-desktop.git']) subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet']) @@ -60,8 +57,8 @@ def setPagureMasterStage2(): @animation.wait('injecting redcore linux portage configuration - branch master') def setPagureMasterStage3(): - if not os.path.isdir(os.path.join(portageConfigDir, '.git')): - os.chdir(portageConfigDir) + if not os.path.isdir(os.path.join(sisyphus.filesystem.portageConfigDir, '.git')): + os.chdir(sisyphus.filesystem.portageConfigDir) subprocess.call(['git', 'init', '-q']) subprocess.call(['git', 'remote', 'add', 'origin', 'https://pagure.io/redcore/redcore-build.git']) subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet']) |