[skip-ci] Add firefox from ppa installation
This commit is contained in:
parent
5a7e5a8535
commit
e428287790
1 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
package org.domaindrivenarchitecture.provs.desktop.infrastructure
|
||||
|
||||
import org.domaindrivenarchitecture.provs.framework.core.Prov
|
||||
import org.domaindrivenarchitecture.provs.framework.core.writeToFile
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.filesystem.base.addTextToFile
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstall
|
||||
import org.domaindrivenarchitecture.provs.framework.ubuntu.install.base.aptInstallFromPpa
|
||||
import java.io.File
|
||||
|
||||
|
||||
fun Prov.installFirefox(
|
||||
|
||||
) = task {
|
||||
|
||||
cmd("snap remove firefox", sudo = true)
|
||||
aptInstall("software-properties-common")
|
||||
cmd("sudo add-apt-repository -y ppa:mozillateam/ppa")
|
||||
|
||||
addTextToFile(
|
||||
"\nPackage: *\n" +
|
||||
"Pin: release o=LP-PPA-mozillateam\n" +
|
||||
"Pin-Priority: 1001\n",
|
||||
File("/etc/apt/preferences.d/mozilla-firefox"),
|
||||
sudo = true
|
||||
)
|
||||
|
||||
addTextToFile(
|
||||
"""Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${'$'}{distro_codename}";""",
|
||||
File("/etc/apt/preferences.d/mozilla-firefox"),
|
||||
sudo = true
|
||||
)
|
||||
|
||||
aptInstall("firefox")
|
||||
}
|
Loading…
Reference in a new issue