diff options
author | 2023-02-14 12:26:02 +0800 | |
---|---|---|
committer | 2023-02-14 06:45:11 +0000 | |
commit | 99fb7f7e6c0d23c390924593e1b9e93cceab1ba4 (patch) | |
tree | 1efd2d371fbfd82ebc5babd91df6f551c19c4fe2 /functions.sh | |
parent | f845220cd17f89c8e1c68aecb3f0c7e82a56aa03 (diff) |
Fix the Doc lint, shellcheck and doc links Errors
Signed-off-by: xudan16 <xudan16@huawei.com>
Change-Id: I15b4cd15a17782999af30234b459f8aacf45e768
Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/73867
Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org>
Diffstat (limited to 'functions.sh')
-rwxr-xr-x | functions.sh | 150 |
1 files changed, 75 insertions, 75 deletions
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" } |