#!/bin/bash
if [ $# -eq 1 ]
then
ppa_name=`echo "$1" | cut -d":" -f2 -s`
if [ -z "$ppa_name" ]
then
echo "PPA name not found"
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
else
echo "$ppa_name"
echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu lucid main"
>> /etc/apt/sources.list
apt-get update >> /dev/null 2> /tmp/apt_add_key.txt
key=`cat /tmp/apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
rm -rf /tmp/apt_add_key.txt
fi
else
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
fi
if [ $# -eq 1 ]
then
ppa_name=`echo "$1" | cut -d":" -f2 -s`
if [ -z "$ppa_name" ]
then
echo "PPA name not found"
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
else
echo "$ppa_name"
echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu lucid main"
>> /etc/apt/sources.list
apt-get update >> /dev/null 2> /tmp/apt_add_key.txt
key=`cat /tmp/apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
rm -rf /tmp/apt_add_key.txt
fi
else
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
fi
Copie com um editor de textos e salve na sua pasta /home com o nome de add-apt-repository.
Depois abra o terminal e digite:
sudo su
mv add-apt-repository /usr/sbin
chmod o+x /usr/sbin/add-apt-repository
chown root:root /usr/sbin/add-apt-repository
Assim, sempre que quisermos adicionar uma ppa, basta digitar o comando igual fari no Ubuntu.
fonte
https://www.vivaolinux.com.br/dica/Como-adicionar-PPAs-no-Debian