Improves the logic around ppa addition
kickstart will check if the ppa has already been added and only update the package cache the first time it is added. Further updates must be handled by hand. It also installs the required packages to manage the ppa over command line if it is not present yet.
This commit is contained in:
parent
caa3a7378b
commit
790f5b41ee
@ -1,6 +1,13 @@
|
|||||||
kickstart.apt.ppa() {
|
kickstart.apt.ppa() {
|
||||||
kickstart.mute add-apt-repository -y "$1"
|
if ! cat /etc/apt/sources.list.d/* | kickstart.stream.contains "${1#ppa:}"; then
|
||||||
kickstart.package.update
|
if ! kickstart.command_exists add-apt-repository; then
|
||||||
|
kickstart.info "Required add-apt-repository command not found. Installing package."
|
||||||
|
kickstart.package.install python-software-properties || kickstart.package.install software-properties-common
|
||||||
|
fi
|
||||||
|
|
||||||
|
kickstart.mute add-apt-repository -y "$1"
|
||||||
|
kickstart.package.update
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
kickstart.apt.add_key_from_url() {
|
kickstart.apt.add_key_from_url() {
|
||||||
|
Loading…
Reference in New Issue
Block a user