Update file executable_install-program
This commit is contained in:
parent
e603849fd1
commit
e0eda38128
1 changed files with 14 additions and 4 deletions
|
@ -988,15 +988,25 @@ async function ensurePackageManager(packageManager) {
|
||||||
const pacman = which.sync('pacman', { nothrow: true })
|
const pacman = which.sync('pacman', { nothrow: true })
|
||||||
const zypper = which.sync('zypper', { nothrow: true })
|
const zypper = which.sync('zypper', { nothrow: true })
|
||||||
if (apt) {
|
if (apt) {
|
||||||
runCommand('Ensuring snapd is installed', `if [ -f /etc/apt/preferences.d/nosnap.pref ]; then sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/nosnap.pref.bak; fi && sudo apt-get install -y snapd`)
|
if (fileExists('/etc/apt/preferences.d/nosnap.pref')) {
|
||||||
|
$`sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/nosnap.pref.bak`
|
||||||
|
}
|
||||||
|
runCommand('Ensuring snapd is installed', `sudo apt-get install -y snapd`)
|
||||||
// TODO Following may be required on Kali -> https://snapcraft.io/docs/installing-snap-on-kali
|
// TODO Following may be required on Kali -> https://snapcraft.io/docs/installing-snap-on-kali
|
||||||
// systemctl enable --now snapd apparmor
|
// systemctl enable --now snapd apparmor
|
||||||
} else if (dnf) {
|
} else if (dnf) {
|
||||||
runCommand('Ensuring snapd is installed', `sudo dnf install -y snapd && if [ ! -d /snap ]; then sudo ln -s /var/lib/snapd/snap /snap; fi`)
|
runCommand('Ensuring snapd is installed', `sudo dnf install -y snapd`)
|
||||||
|
if (!fileExists('/snap')) {
|
||||||
|
await $`sudo ln -s /var/lib/snapd/snap /snap`
|
||||||
|
}
|
||||||
} else if (yum) {
|
} else if (yum) {
|
||||||
runCommand('Ensuring snapd is installed', `sudo yum install -y snapd && sudo systemctl enable --now snapd.socket && if [ ! -d /snap ]; then sudo ln -s /var/lib/snapd/snap /snap; fi`)
|
runCommand('Ensuring snapd is installed', `sudo yum install -y snapd')
|
||||||
|
await $`sudo systemctl enable --now snapd.socket`
|
||||||
|
if (!fileExists('/snap')) {
|
||||||
|
$`sudo ln -s /var/lib/snapd/snap /snap`
|
||||||
|
}
|
||||||
} else if (pacman) {
|
} else if (pacman) {
|
||||||
runCommand('Ensuring snapd is installed', `if [ -f /etc/arch-release ]; then sudo git clone https://aur.archlinux.org/snapd.git /usr/local/src/snapd && cd /usr/local/src/snapd && sudo makepkg -si; else sudo pacman -S snapd && sudo systemctl enable --now snapd.socket && if [ ! -d /snap ]; then sudo ln -s /var/lib/snapd/snap /snap; fi; fi`)
|
$`if [ -f /etc/arch-release ]; then sudo git clone https://aur.archlinux.org/snapd.git /usr/local/src/snapd && cd /usr/local/src/snapd && sudo makepkg -si; else sudo pacman -S snapd && sudo systemctl enable --now snapd.socket && if [ ! -d /snap ]; then sudo ln -s /var/lib/snapd/snap /snap; fi; fi`
|
||||||
} else if (zypper) {
|
} else if (zypper) {
|
||||||
// TODO See https://snapcraft.io/docs/installing-snap-on-opensuse
|
// TODO See https://snapcraft.io/docs/installing-snap-on-opensuse
|
||||||
await $`
|
await $`
|
||||||
|
|
Loading…
Reference in a new issue