PDA

View Full Version : [ubuntu] Add to source list and import key with one command?



Sup3r3g0
June 15th, 2009, 10:10 PM
If I have the this:



deb http://ppa.launchpad.net/globalmenu-team/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/globalmenu-team/ppa/ubuntu jaunty main

And the link to key, can I adapt it to something like this?



sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update

oldos2er
June 16th, 2009, 02:42 AM
You can use && to string two or more commands together e.g.

sudo apt-get update && sudo apt-get upgrade If one of the commands fails for some reason, the subsequent command(s) will not run; in other words, one command must be successfully run before the next will work. Kind of a fail-safe thing.

Sup3r3g0
June 16th, 2009, 04:59 AM
Okay thanks