From dc3ba822d34a17e4224de22ad9c594fafb85f32e Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 9 Sep 2015 07:32:45 +0300 Subject: [PATCH] Added doinst.sh file in sbo network --- slpkg/sbo/network.py | 7 +++++++ slpkg/sbo/read.py | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/slpkg/sbo/network.py b/slpkg/sbo/network.py index 4adc63d6..efd69c65 100644 --- a/slpkg/sbo/network.py +++ b/slpkg/sbo/network.py @@ -100,6 +100,11 @@ class SBoNetwork(object): ".SlackBuild") fill = self.fill_pager(SlackBuild) self.pager(SlackBuild + fill) + elif self.choice in ["O", "o"]: + doinst_sh = ReadSBo(self.sbo_url).doinst("doinst.sh") + if doinst_sh != " ": + fill = self.fill_pager(doinst_sh) + self.pager(doinst_sh + fill) elif self.choice in ["B", "b"]: self.build() delete(self.build_folder) @@ -154,6 +159,8 @@ class SBoNetwork(object): self.red, self.endc, br2)) print("| In{0}{1}f{2}{3}o{4} View the Info file".format( br1, self.red, self.endc, br2, fix_sp)) + print("| D{0}{1}o{2}{3}inst.sh{4} View the doinst.sh " + "file".format(br1, self.red, self.endc, br2, fix_sp)) print("| {0}D{1}{2}ownload Download this package".format( self.red, self.endc, br2)) print("| {0}B{1}{2}uild Download and build".format( diff --git a/slpkg/sbo/read.py b/slpkg/sbo/read.py index 406005f8..7ab80a9d 100644 --- a/slpkg/sbo/read.py +++ b/slpkg/sbo/read.py @@ -48,3 +48,9 @@ class ReadSBo(object): Read SlackBuild file """ return URL(self.sbo_url + name + sbo_file).reading() + + def doinst(self, doinst_sh): + """ + Read SlackBuild doinst.sh + """ + return URL(self.sbo_url + doinst_sh).reading()