#!/bin/bash

install_version=${1:-"1.06"}
package_name="sshpass-${install_version}"

# Download
cd /tmp
rm -f ${package_name}.tar.gz
wget https://tools.mindspore.cn/tools/ci/sshpass/${package_name}/${package_name}.tar.gz
rm -rf ${package_name}
tar -zxf ${package_name}.tar.gz

# Install
cd /tmp/${package_name}
./configure
make -j4
make install
cd ..

# Delete package
rm -f /tmp/${package_name}.tar.gz
rm -rf /tmp/${package_name}
