X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=debug_tools%2Finstall_perl_dependencies.sh;fp=debug_tools%2Finstall_perl_dependencies.sh;h=d2ef82d51e7e8254202814bc519b11c3b3bf0559;hb=007a7c53b32f289c795d1135c170a231ae4cbf67;hp=0000000000000000000000000000000000000000;hpb=c305715705f2fc92e418c49cbb7c43e501c3d4c6;p=transportpce.git diff --git a/debug_tools/install_perl_dependencies.sh b/debug_tools/install_perl_dependencies.sh new file mode 100755 index 000000000..d2ef82d51 --- /dev/null +++ b/debug_tools/install_perl_dependencies.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set +x + +#check if apt exists +if sudo apt-get install libnet-openssh-perl libio-pty-perl;then + echo "installed." + exit +fi +#check if yum exists +if sudo yum install perl-Net-OpenSSH perl-IO-Tty;then + echo "yum-get is installed." + sudo yum install perl-Net-OpenSSH perl-IO-Tty + exit +fi +#check if cpanm exists +if [ -x "$(command -v cpanm)" ];then + echo "cpanm is installed." + cpanm IO::Pty + cpanm Net::OpenSSH + exit +else + echo "cannot install dependencies: apt-get and yum and perlbrew/cpanm are not available." >&2 + exit 1 +fi