From 99fb7f7e6c0d23c390924593e1b9e93cceab1ba4 Mon Sep 17 00:00:00 2001 From: xudan16 Date: Tue, 14 Feb 2023 12:26:02 +0800 Subject: Fix the Doc lint, shellcheck and doc links Errors Signed-off-by: xudan16 Change-Id: I15b4cd15a17782999af30234b459f8aacf45e768 Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/73867 Tested-by: jenkins-ci --- functions.sh | 150 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 75 insertions(+), 75 deletions(-) (limited to 'functions.sh') diff --git a/functions.sh b/functions.sh index 4eaa281..3ca3e09 100755 --- a/functions.sh +++ b/functions.sh @@ -69,83 +69,83 @@ check_prerequisites() { #------------------------------------------------------------------------------- if [ "$OS_ID" == "ubuntu" ]; then - sudo apt update -y - ansible --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo apt-add-repository --yes --update ppa:ansible/ansible - sudo apt-get install -y ansible - fi - - yq --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -O /usr/bin/yq - sudo chmod +x /usr/bin/yq - fi - - virsh --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo apt-get install -y virsh - fi - - jq --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo apt-get install -y jq - fi - - virtualenv --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo apt-get install -y virtualenv - fi - - pip --version - if [ $RESULT -ne 0 ]; then - sudo apt-get install -y pip - fi + sudo apt update -y + ansible --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo apt-add-repository --yes --update ppa:ansible/ansible + sudo apt-get install -y ansible + fi + + yq --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -O /usr/bin/yq + sudo chmod +x /usr/bin/yq + fi + + virsh --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo apt-get install -y virsh + fi + + jq --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo apt-get install -y jq + fi + + virtualenv --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo apt-get install -y virtualenv + fi + + pip --version + if [ $RESULT -ne 0 ]; then + sudo apt-get install -y pip + fi elif [ "$OS_ID" == "centos" ]; then - sudo yum update -y - ansible --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo dnf install epel-release - sudo dnf install ansible - fi - - yq --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -O /usr/bin/yq - sudo chmod +x /usr/bin/yq - fi - - virsh --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo yum install -y virsh - fi - - jq --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo yum install -y jq - fi - - virtualenv --version - RESULT=$? - if [ $RESULT -ne 0 ]; then - sudo yum install -y virtualenv - fi - - pip --version - if [ $RESULT -ne 0 ]; then - sudo yum install -y pip - fi + sudo yum update -y + ansible --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo dnf install epel-release + sudo dnf install ansible + fi + + yq --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -O /usr/bin/yq + sudo chmod +x /usr/bin/yq + fi + + virsh --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo yum install -y virsh + fi + + jq --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo yum install -y jq + fi + + virtualenv --version + RESULT=$? + if [ $RESULT -ne 0 ]; then + sudo yum install -y virtualenv + fi + + pip --version + if [ $RESULT -ne 0 ]; then + sudo yum install -y pip + fi fi #------------------------------------------------------------------------------- @@ -421,7 +421,7 @@ creates_virtualenv() { if [ ! -d "$CURRENTPATH/.venv" ]; then virtualenv "$CURRENTPATH/.venv" fi - # shellcheck disable=SC1090 + # shellcheck disable=SC1090,SC1091 source "$CURRENTPATH/.venv/bin/activate" pip install -r "$CURRENTPATH/requirements.txt" } -- cgit 1.2.3-korg