Obviamente, se você realmente deseja impressionar o R2D2, também pode evitar o prompt de senha. Prepare sua conta de usuário para ficar assim:
you@yourhost:~$
you@yourhost:~$ cat /home/you/.bash_login;
# ASK_PASS service for you «begins»
export SUDO_ASKPASS="/home/you/.ssh/.supwd.sh";
# ASK_PASS service for you «ends»
you@yourhost:~$
you@yourhost:~$
you@yourhost:~$ cat /home/you/.ssh/.supwd.sh;
#!/bin/sh
echo '(Your sudoer password here)';
you@yourhost:~$
you@yourhost:~$
you@yourhost:~$ ls -l .ssh/.supwd.sh
-rwx------ 1 you you 35 Mar 31 10:28 .ssh/.supwd.sh
you@yourhost:~$
you@yourhost:~$
you@yourhost:~$ cat ./tmp.sh
#!/bin/sh
. /home/you/.bash_login; # 'source' bash_login to declare the ask_pass script
sudo -A add-apt-repository ppa:(Your ppa here) -y;
# The flag '-A' lets you add the repo without sudo demanding your password.
#
you@yourhost:~$
-y
no final do comandoadd-apt-repository -y ...
.