Merge "Device Renderer to support transponder for B100G"
[transportpce.git] / debug_tools / install_perl_dependencies.sh
1 #!/bin/sh
2
3 set +x
4
5 #check if apt exists
6 if sudo apt-get install libnet-openssh-perl libio-pty-perl;then
7    echo "installed."
8    exit
9 fi
10 #check if yum exists
11 if sudo yum install perl-Net-OpenSSH perl-IO-Tty;then
12     echo "yum-get is installed."
13     sudo yum install perl-Net-OpenSSH perl-IO-Tty
14     exit
15 fi
16 #check if cpanm exists
17 if [ -x "$(command -v cpanm)" ];then
18     echo "cpanm is installed."
19     cpanm IO::Pty
20     cpanm Net::OpenSSH
21     exit
22 else
23     echo "cannot install dependencies: apt-get and yum and perlbrew/cpanm are not available." >&2
24     exit 1
25 fi