Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mkdir -p obs/kolab-3.4
cd obs/kolab-3.4
obsurl=http://obs.kolabsys.com/repositories/Kolab:/3.4/CentOS_7/src/
wget $obsurl -O index.html
# see http://unix.stackexchange.com/questions/181254/how-to-use-grep-and-cut-in-script-to-obtain-website-urls-from-an-html-file
for f in `cat index.html | grep rpm | grep -Eoi '<a [^>]+>' | grep -Eo 'href="[^\"]+"' | awk -F'"' '{ print $2}'`
do
wget $obsurl/$f
done
rm index.html
echo "put *src.rpm" | sftp tpokorra@fedorapeople.org:public_html/kolab/kolab-3.4
mkdir -p obs/kolab-3.4-updates
cd obs/kolab-3.4-updates
obsurl=http://obs.kolabsys.com/repositories/Kolab:/3.4:/Updates/CentOS_7/src/
wget $obsurl -O index.html
for f in `cat index.html | grep rpm | grep -Eoi '<a [^>]+>' | grep -Eo 'href="[^\"]+"' | awk -F'"' '{ print $2}'`
do
wget $obsurl/$f
done
rm index.html
echo "put *src.rpm" | sftp tpokorra@fedorapeople.org:public_html/kolab/kolab-3.4-updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.