But the problem is the sub-folders under the cachedir will contain previously download packages too and you have to manually separate out those downloaded in the previous yum install or update which is very tedious. I wrote a shell script to do just the job we need but it is not modeled to handle error conditions, so here are the steps you need to follow,
- first of all it is used to install a package and not update, if you want to update a package and get all this done from the script then you need to change the command in script from "yum install $1" to "yum update $1".
- say you want to download the xchm viewer for your system
- you first type the command "yum install xchm"
- it will search for dependencies and take you to a prompt saying you want to download it or not, say no. If you get any other response from yum like saying "Nothing to do" then don't proceed any further.
- now execute the script with xchm as the argument, i.e. "./yum.sh xchm". It won't ask you this time if you want to download the packages or not.
- It will create a tar ball of all the packages downloaded and will place it in your home directory.
PS: Remember this always, it is need which drives innovation.
3 comments:
"Yummy script!" :)
now you are turning into a real novellite ;)
Hi anandh :)
I'm Ajay from IIITM Kerala. Recently I got selected for the Sun CA program. I want help from you. Can u send ur email id so that i can contact you. Or add my gmail id ajay.iiitmk@gmail.com so that we can chat.
Thanks.
Thanks for this.
saved a lot of time for me. Keep up the good work
Ravi K London, formally from Chennai & Jaffna
Post a Comment