diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-06 20:37:56 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-06 20:37:56 +0100 |
commit | ed88746cd33c0f861e9c45bf05bf9e44d86089ba (patch) | |
tree | e6656f3d54bd738383d048c744d330dca2c15e4c /src/backend/branchnext.py | |
parent | 2d86cd9ddc5d9442e4a8e8fb50d72480a8293a4a (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/branchnext.py')
-rw-r--r-- | src/backend/branchnext.py | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/backend/branchnext.py b/src/backend/branchnext.py index bb29b04..5c9e390 100644 --- a/src/backend/branchnext.py +++ b/src/backend/branchnext.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 next') def setGitlabNextStage1(): - 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', 'next', '--quiet']) @@ -19,8 +16,8 @@ def setGitlabNextStage1(): @animation.wait('injecting redcore linux ebuild tree - branch next') def setGitlabNextStage2(): - 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', 'next', '--quiet']) @@ -28,8 +25,8 @@ def setGitlabNextStage2(): @animation.wait('injecting redcore linux portage configuration - branch next') def setGitlabNextStage3(): - 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', 'next', '--quiet']) @@ -42,8 +39,8 @@ def startGitlab(): @animation.wait('injecting gentoo linux portage tree - branch next') def setPagureNextStage1(): - 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', 'next', '--quiet']) @@ -51,8 +48,8 @@ def setPagureNextStage1(): @animation.wait('injecting redcore linux ebuild tree - branch next') def setPagureNextStage2(): - 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', 'next', '--quiet']) @@ -60,8 +57,8 @@ def setPagureNextStage2(): @animation.wait('injecting redcore linux portage configuration - branch next') def setPagureNextStage3(): - 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', 'next', '--quiet']) |