diff --git a/.local/share/chezmoi/home/dot_local/bin/executable_install-program b/.local/share/chezmoi/home/dot_local/bin/executable_install-program index 3c177a0a..5ea7682c 100644 --- a/.local/share/chezmoi/home/dot_local/bin/executable_install-program +++ b/.local/share/chezmoi/home/dot_local/bin/executable_install-program @@ -114,10 +114,25 @@ async function generateInstallOrders() { if (bin) { const alreadyInstalled = which.sync(bin, { nothrow: true }) if (alreadyInstalled) { + log('info', 'Skipping Package', `${bin} is already in the PATH`) continue pkgFor } } } + const whens = [ + softwarePackages[pkg + ":" + osID] && softwarePackages[pkg + ":" + osID]['_when'], + softwarePackages[pkg + ":" + osType] && softwarePackages[pkg + ":" + osType]['_when'], + softwarePackages[pkg] && softwarePackages[pkg]['_when'] + ] + for (const when of whens) { + if (when) { + try { + await $`${when}` + } catch (e) { + log('info', 'Skipping Package', `${pkg} is being skipped because of the _when condition`) + } + } + } if (softwarePackages[pkg + ":" + osID]) { packageKey = pkg + ":" + osID; } else if (softwarePackages[pkg + ":" + osType]) { diff --git a/.local/share/chezmoi/software.yml b/.local/share/chezmoi/software.yml index b0cd70fe..e1d53b10 100644 --- a/.local/share/chezmoi/software.yml +++ b/.local/share/chezmoi/software.yml @@ -2011,17 +2011,22 @@ softwarePackages: _name: fzf _service: null ansible: professormanhattan.fzf - g-assist: + google-assistant: _bin: null - _desc: A cross-platform unofficial Google Assistant Client for Desktop + _desc: '[Google Assistant for Desktop](https://github.com/Melvin-Abraham/Google-Assistant-Unofficial-Desktop-Client) is a cross-platform unofficial Google Assistant Client for Desktop.' _docs: null _github: https://github.com/Melvin-Abraham/Google-Assistant-Unofficial-Desktop-Client _home: null - _name: Google Assistant Unofficial Desktop Client + _name: Google Assistant for Desktop _service: true _type: application github: github.com/Melvin-Abraham/Google-Assistant-Unofficial-Desktop-Client snap: g-assist + google-assistant:darwin: + _when: '! test -d /Applications/Google Assistant.app' + ansible: professormanhattan.googleassistant + google-assistant:windows: + ansible: professormanhattan.googleassistant gcloud: _bin: null _desc: null @@ -2505,15 +2510,6 @@ softwarePackages: brew: gomplate choco: gomplate port: gomplate - googleassistant: - _bin: null - _desc: '[Google Assistant for Desktop](https://github.com/Melvin-Abraham/Google-Assistant-Unofficial-Desktop-Client) is a cross-platform unofficial Google Assistant Client for Desktop.' - _docs: https://developers.google.com/assistant - _github: null - _home: https://assistant.google.com/ - _name: Google Assistant for Desktop - _service: null - ansible: professormanhattan.googleassistant googlecloudsdk: _bin: null _desc: '[Google Cloud SDK](https://cloud.google.com/sdk) includes tools and libraries for interacting with Google Cloud products and services. With it, you can orchestrate virtual machine instances directly from your command line, manage Compute Engine networks/firewalls/disks, simulate Pub/Sub locally, and much more.'