remove duplicated progress usage when installing ospf mdr
This commit is contained in:
parent
1cadf8362f
commit
119a3640e4
1 changed files with 16 additions and 18 deletions
34
tasks.py
34
tasks.py
|
@ -173,27 +173,25 @@ def install_ospf_mdr(c: Context, os_info: OsInfo, hide: bool) -> None:
|
||||||
if c.run("which zebra", warn=True, hide=hide):
|
if c.run("which zebra", warn=True, hide=hide):
|
||||||
print("\nquagga already installed, skipping ospf mdr")
|
print("\nquagga already installed, skipping ospf mdr")
|
||||||
return
|
return
|
||||||
p = Progress(not hide)
|
if os_info.like == OsLike.DEBIAN:
|
||||||
with p.start("installing ospf mdr dependencies"):
|
c.run("sudo apt install -y libtool gawk libreadline-dev git", hide=hide)
|
||||||
if os_info.like == OsLike.DEBIAN:
|
elif os_info.like == OsLike.REDHAT:
|
||||||
c.run("sudo apt install -y libtool gawk libreadline-dev git", hide=hide)
|
c.run("sudo yum install -y libtool gawk readline-devel git", hide=hide)
|
||||||
elif os_info.like == OsLike.REDHAT:
|
clone_dir = "/tmp/ospf-mdr"
|
||||||
c.run("sudo yum install -y libtool gawk readline-devel git", hide=hide)
|
c.run(
|
||||||
clone_dir = "/tmp/ospf-mdr"
|
f"git clone https://github.com/USNavalResearchLaboratory/ospf-mdr {clone_dir}",
|
||||||
|
hide=hide
|
||||||
|
)
|
||||||
|
with c.cd(clone_dir):
|
||||||
|
c.run("./bootstrap.sh", hide=hide)
|
||||||
c.run(
|
c.run(
|
||||||
f"git clone https://github.com/USNavalResearchLaboratory/ospf-mdr {clone_dir}",
|
"./configure --disable-doc --enable-user=root --enable-group=root "
|
||||||
|
"--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh "
|
||||||
|
"--localstatedir=/var/run/quagga",
|
||||||
hide=hide
|
hide=hide
|
||||||
)
|
)
|
||||||
with c.cd(clone_dir):
|
c.run("make -j$(nproc)", hide=hide)
|
||||||
c.run("./bootstrap.sh", hide=hide)
|
c.run("sudo make install", hide=hide)
|
||||||
c.run(
|
|
||||||
"./configure --disable-doc --enable-user=root --enable-group=root "
|
|
||||||
"--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh "
|
|
||||||
"--localstatedir=/var/run/quagga",
|
|
||||||
hide=hide
|
|
||||||
)
|
|
||||||
c.run("make -j$(nproc)", hide=hide)
|
|
||||||
c.run("sudo make install", hide=hide)
|
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
|
|
Loading…
Reference in a new issue