Created
March 29, 2013 18:47
-
-
Save stovak/5272769 to your computer and use it in GitHub Desktop.
download the latest release RPM certs to a new install of red hat
This file contains hidden or 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/sh | |
cd /tmp | |
curl http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/repodata/primary.sqlite.bz2 | bzip2 -dc > primary.sqlite | |
sqlite3 ./primary.sqlite "select url,location_href from packages where name like '%release%' order by name;" | |
## to do Take product of the third operation and replace "|" (pipe) with "/stable/Redhat/6/x86_64/" and pipe the result to: | |
# rpm -ivh $1 |
cd /tmp
curl http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/repodata/primary.sqlite.bz2 | bzip2 -dc > primary.sqlite
for line in $(sqlite3 ./primary.sqlite "select url,location_href from packages where name like '%release%' order by name;"); do
rpm -iuvh echo $line | sed -e 's:|:/stable/Redhat/6/x86_64/:g'
done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
!/bin/sh
cd /tmp
curl -O http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/repodata/primary.sqlite.bz2
bunzip2 primary.sqlite.bz2
sqlite3 ./primary.sqlite "SELECT url, location_href FROM packages WHERE name LIKE '%release%' ORDER BY name;" > release_urls
for line in
cat release_urls
; dofull_url=
echo $line | sed -e 's:|:/stable/Redhat/6/x86_64/:g'
rpm -ivh $full_url
done
rm release_urls
rm primary.sqlite