6 # -o pipefail: Fail on errors in scripts this calls, give stacktrace
9 # Update mirror list to avoid slow/hung one
10 sudo yum update -y yum-plugin-fastestmirror
12 # Install ODL from .rpm link or .repo url
13 if [[ $URL == *.rpm ]]
15 sudo yum install -y "$URL"
16 elif [[ $URL == *.repo ]]
18 # shellcheck disable=SC2154
19 repo_file="${{URL##*/}}"
20 sudo curl --silent -o /etc/yum.repos.d/"$repo_file" "$URL"
21 sudo yum install -y opendaylight
23 echo "URL is not a link to .rpm or .repo"