Update file executable_install-program
This commit is contained in:
parent
c499c871d5
commit
b9fee3f439
1 changed files with 6 additions and 8 deletions
|
@ -987,15 +987,15 @@ 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) {
|
||||||
await $`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`
|
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`)
|
||||||
// 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) {
|
||||||
await $`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 [ ! -d /snap ]; then sudo ln -s /var/lib/snapd/snap /snap; fi`)
|
||||||
} else if (yum) {
|
} else if (yum) {
|
||||||
await $`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 && sudo systemctl enable --now snapd.socket && if [ ! -d /snap ]; then sudo ln -s /var/lib/snapd/snap /snap; fi`)
|
||||||
} else if (pacman) {
|
} else if (pacman) {
|
||||||
await $`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`
|
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`)
|
||||||
} 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 $`
|
||||||
|
@ -1004,7 +1004,7 @@ async function ensurePackageManager(packageManager) {
|
||||||
}
|
}
|
||||||
const snap = which.sync('snap', { nothrow: true })
|
const snap = which.sync('snap', { nothrow: true })
|
||||||
if (snap) {
|
if (snap) {
|
||||||
await $`sudo snap install core`
|
runCommand('Ensuring snap core is installed', `sudo snap install core`)
|
||||||
} else {
|
} else {
|
||||||
log('warn', logStage, 'Snap installation sequence completed but the snap bin is still not available')
|
log('warn', logStage, 'Snap installation sequence completed but the snap bin is still not available')
|
||||||
}
|
}
|
||||||
|
@ -1353,9 +1353,7 @@ async function pruneInstallOrders(installOrders) {
|
||||||
let newVal = newOrders[pkgManager]
|
let newVal = newOrders[pkgManager]
|
||||||
for (const pkg of newOrders[pkgManager]) {
|
for (const pkg of newOrders[pkgManager]) {
|
||||||
try {
|
try {
|
||||||
console.log('start')
|
runCommand('Pruning Homebrew packages that are already installed - ${pkg}', `brew list ${pkg}`)
|
||||||
runCommand('Pruning Homebrew packages that are already installed from the install list', `brew list ${pkg}`)
|
|
||||||
console.log('stop')
|
|
||||||
newVal = newVal.filter(x => x === pkg)
|
newVal = newVal.filter(x => x === pkg)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|
Loading…
Reference in a new issue