From 4b48d955afc72e018f479a63a5fb2e89ea2b0926 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Mon, 9 Jan 2023 11:34:43 +0000 Subject: [PATCH] Update 3 files - /home/dot_local/bin/symlink_yank - /home/dot_local/bin/executable_install-program - /software.yml --- home/dot_local/bin/executable_install-program | 13 +++++++++++-- home/dot_local/bin/symlink_yank | 3 +++ software.yml | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 home/dot_local/bin/symlink_yank diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index d25fbab5..f2bf4065 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1083,7 +1083,7 @@ async function installPackageList(packageManager, packages) { if (pkg.substring(0, 4) === 'http') { log('info', 'AppImage Install', `Installing ${pkg} from its URL`) runCommand('Installing ${pkg} via zap', `sudo zap install --select-first -q --from ${pkg}`) - } else if ((pkg.match(/\\/g) || []).length === 1) { + } else if ((pkg.match(/\//g) || []).length === 1) { log('info', 'AppImage Install', `Installing ${pkg} from a GitHub Release`) runCommand('Installing ${pkg} via zap', `sudo zap install --select-first -q --github --from ${pkg}`) } else { @@ -1429,7 +1429,16 @@ async function pruneInstallOrders(installOrders) { for (const pkgManager in installOrders) { log('info', 'Filter', `Filtering the ${pkgManager} installOrders`) console.log(newOrders[pkgManager]) - if (pkgManager === 'apt') { + if (pkgManager === 'appimage') { + newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (pkg) => { + try { + await runSilentCommand(`zap list | grep ${pkg} > /dev/null`) + return false + } catch (e) { + return true + } + }) + } else if (pkgManager === 'apt') { newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (pkg) => { try { await runSilentCommand(`dpkg -l ${pkg} | grep -E '^ii' > /dev/null`) diff --git a/home/dot_local/bin/symlink_yank b/home/dot_local/bin/symlink_yank new file mode 100644 index 00000000..240d6447 --- /dev/null +++ b/home/dot_local/bin/symlink_yank @@ -0,0 +1,3 @@ +{{- if (eq .host.distro.id "ubuntu") -}} +/usr/bin/yank-cli +{{- end -}} \ No newline at end of file diff --git a/software.yml b/software.yml index 5db5c694..59d9506c 100644 --- a/software.yml +++ b/software.yml @@ -3232,7 +3232,7 @@ softwarePackages: _name: null brew:darwin: ideviceinstaller imagemagick: - _bin: magick + _bin: convert _desc: null _docs: null _github: null @@ -7285,6 +7285,7 @@ softwarePackages: scoop: sshfs-np yank: _bin: yank + _bin:apt: yank-cli _desc: '[yank](https://github.com/mptre/yank) is a terminal agnostic solution which allows copying output from Termial easily, without the need to use Terminal multiplexers.' _docs: null _github: null