Aqui está o meu bootstrap.sh
apt-get update
apt-get install -y python-software-properties
add-apt-repository -y ppa:webupd8team/java
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
# Update apt sources
apt-get update
# Install stuff available through apt-get
apt-get install -y unzip wget oracle-java7-installer oracle-java7-set-default
Estou tentando entender por que essas duas linhas
add-apt-repository -y ppa:webupd8team/java
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
necessário para instalar o Java.
De acordo com o manual do ubuntu,
add-apt-repository
is a script which adds an external APT repository to
either /etc/apt/sources.list or a file in /etc/apt/sources.list.d/ or
removes an already existing repository.
mas o repositório apt não deve ser atualizado automaticamente quando você
apt-get update
apt-get install -y oracle-java7-installer
?
E o que faz
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
fazer?