I am back with some more scripting fun.
I have been working on configuring my new debian machine and found one utility very lacking in debian and that was add-apt-repository.
So i set down and took my time out and finally i am able to mix match this simple script.
Disclaimer: I know adding ppa can have adverse effects on debian machines
At this point the work that this script performs is
- add the repository of the ppa. (here i am using lucid as the distribution of choice, coz i am using squeeze as my debian version)
- add the gpg key to the keyring.
- This script is at this pointed tested only on one machine. debian Squeeze (mint Flavoured.)
Steps to install this.
- Download file
$ wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt
2. Save this file in /usr/sbin/
$ cp add-apt-repository.sh.txt /usr/sbin/add-apt-repository
3. Change permissions to execute
$ chmod o+x /usr/sbin/add-apt-repository
4. Change ownership to root
$chown root:root /usr/sbin/add-apt-repository
5. Now when ever you need to execute command type
$ sudo add-apt-repository ppa:ppa-name
Opening this script to larger audience so that we can crowdsource efforts if someone likes it.
hope this can help someone
7 – Jan – 2011 : Updated the tutorial to place the file @ /usr/sbin as suggested at various during comments.
6 – Aug – 2011 : Updated the script to deal with the security hole (although not easily exploitable) as suggested by 7eggert at comment no 23
10 Sep – 2011 : bin corrected to sbin in step 3 and 4.. : thanks to Craig for pointing that out