Results 1 to 7 of 7

Thread: Is it possible to add multiple PPA's at the same time?

  1. #1
    Join Date
    Dec 2012
    Beans
    13

    Is it possible to add multiple PPA's at the same time?

    Hi, as I like to tinker with my Ubuntu setup (often re-installing etc) I have built up a text file of all the programs that I use the most.

    I was just wondering if it is possible to combine the following into a single terminal command to save time as more gets added to the list.
    Code:
    sudo apt-add-repository ppa:cdemu/ppa
    sudo apt-add-repository ppa:fengestad/devel
    sudo apt-add-repository ppa:tualatrix/ppa
    sudo apt-add-repository ppa:stebbins/handbrake-releases
    sudo apt-add-repository ppa:cairo-dock-team/ppa
    I know I could write a script to add the PPA's but I would prefer a simple one line terminal command if possible.

    Thanks.
    Last edited by DaveBaxter; May 27th, 2013 at 09:55 PM. Reason: font

  2. #2
    Join Date
    Jun 2007
    Location
    Arizona U.S.A.
    Beans
    1,860

    Re: Is it possible to add multiple PPA's at the same time?

    Try joining with && . Does it work? These are interactive. Once this is written, how many times could it be used?

  3. #3
    Join Date
    Dec 2012
    Beans
    13

    Re: Is it possible to add multiple PPA's at the same time?

    Quote Originally Posted by Dennis N View Post
    Try joining with && . Does it work? These are interactive. Once this is written, how many times could it be used?
    Hi, && doesn't work, only the first PPA gets added, the rest dont.

    Thanks anyway

  4. #4
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Is it possible to add multiple PPA's at the same time?

    Now this is a... bit dangerous since you dont get prompts.
    Code:
    sudo apt-add-repository -y ppa:cdemu/ppa && sudo apt-add-repository -y ppa:fengestad/devel && sudo apt-add-repository -y ppa:tualatrix/ppa && sudo apt-add-repository -y ppa:stebbins/handbrake-releases && sudo apt-add-repository -y ppa:cairo-dock-team/ppa
    Also, many flags/operations avlaliable for command-line problems can be determined by running
    Code:
    command --help
    or if you want the long version.
    Code:
    man command
    Ubuntu Forums Moderation Staff
    Okay then. We're relying on mirror dust and fairies but now we have a plan which is progress - Emma

  5. #5
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: Is it possible to add multiple PPA's at the same time?

    Code:
    while read -r r; do sudo apt-add-repository $r; done< <(echo -e 'ppa:cdemu/ppa\nppa:fengestad/devel\nppa:tualatrix/ppa\nppa:stebbins/handbrake-releases\nppa:cairo-dock-team/ppa')
    Last edited by HiImTye; May 27th, 2013 at 08:41 PM.

  6. #6
    Join Date
    Oct 2010
    Location
    London
    Beans
    481
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Is it possible to add multiple PPA's at the same time?

    In the same vein as HilmTye's response:

    Code:
    for f in ppa:cdemu/ppa ppa:fengestad/devel ppa:tualatrix/ppa ppa:stebbins/handbrake-releases ppa:cairo-dock-team/ppa; do sudo add-apt-repository $f; done
    Please mark your thread as solved if you get a satisfactory solution to your problem.

  7. #7
    Join Date
    Dec 2012
    Beans
    13

    Re: Is it possible to add multiple PPA's at the same time?

    Thanks guys (and gals), Going with sandyd's solution. (Thanks to everyone else who answered also).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •