mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Check if the script exists
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
5f092d0835
commit
222ae7d0c6
1 changed files with 9 additions and 7 deletions
|
@ -126,14 +126,16 @@ class Slackbuilds:
|
|||
def patch_sbo_tag(self, sbo):
|
||||
''' Patching SBo TAG from the configuration file. '''
|
||||
sbo_script = f'{self.build_path}/{sbo}/{sbo}.SlackBuild'
|
||||
with open(sbo_script, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
with open(sbo_script, 'w') as script:
|
||||
for line in lines:
|
||||
if line.startswith('TAG=$'):
|
||||
line = f'TAG=${{TAG:-{self.sbo_repo_tag}}}\n'
|
||||
script.write(line)
|
||||
if os.path.isfile(sbo_script):
|
||||
with open(sbo_script, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
with open(sbo_script, 'w') as script:
|
||||
for line in lines:
|
||||
if line.startswith('TAG=$'):
|
||||
line = f'TAG=${{TAG:-{self.sbo_repo_tag}}}\n'
|
||||
script.write(line)
|
||||
|
||||
def logging_installed_dependencies(self, name: str):
|
||||
''' Logging installed dependencies and used for remove. '''
|
||||
|
|
Loading…
Add table
Reference in a new issue