Created
March 15, 2018 16:39
-
-
Save velenux/a254287976f32d24ec0467b8eacb3fda to your computer and use it in GitHub Desktop.
download crmsh packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for some reason, this repo is having problems with yum | |
base_url="https://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-7/noarch/" | |
file_tmp=$(mktemp) | |
/usr/bin/curl -sS -Lo "$file_tmp" "$base_url" | |
if [ "x$?" != "x0" ]; then | |
echo "Error while opening the download page" | |
exit 1 | |
fi | |
for pkg in crmsh crmsh-scripts python-parallax ; do | |
package=$(grep "a href=\"$pkg" "$file_tmp" | head -n1 | cut -d\" -f4) | |
/usr/bin/curl -LO -sS "${base_url}${package}" | |
done | |
rm -f "$file_tmp" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment