Update 3 files
- /home/.chezmoidata.yaml - /home/dot_local/bin/executable_install-program - /software.yml
This commit is contained in:
parent
e86c0d6ffe
commit
f0d55fbb76
3 changed files with 17 additions and 11 deletions
|
@ -559,7 +559,8 @@ softwareGroups:
|
||||||
- netdata
|
- netdata
|
||||||
- samba
|
- samba
|
||||||
- sftpgo
|
- sftpgo
|
||||||
- vector
|
# Headless install needs work since it is run via script
|
||||||
|
# - vector
|
||||||
- wazuh
|
- wazuh
|
||||||
Shell-Scripting: &Shell-Scripting
|
Shell-Scripting: &Shell-Scripting
|
||||||
- shc
|
- shc
|
||||||
|
|
|
@ -86,6 +86,7 @@ function fileExists(pathToFile) {
|
||||||
|
|
||||||
let installData
|
let installData
|
||||||
let installOrders = {}
|
let installOrders = {}
|
||||||
|
let binLinkRan = false
|
||||||
const installOrdersPre = []
|
const installOrdersPre = []
|
||||||
const installOrdersPost = []
|
const installOrdersPost = []
|
||||||
const installOrdersService = []
|
const installOrdersService = []
|
||||||
|
@ -1100,8 +1101,8 @@ async function installPackageList(packageManager, packages) {
|
||||||
if (unbuffer) {
|
if (unbuffer) {
|
||||||
unbufferPrefix = 'unbuffer'
|
unbufferPrefix = 'unbuffer'
|
||||||
}
|
}
|
||||||
const verboseMode = process.env.DEBUG_MODE === 'on' ? '-vvv' : ''
|
const verboseMode = process.env.DEBUG_MODE === 'on' ? 'vv' : ''
|
||||||
await $`ANSIBLE_CONFIG=${process.env.HOME}/.local/share/ansible/ansible.cfg ansible 127.0.0.1 ${verboseMode} -e '{ ansible_connection: "local", ansible_become_user: "root", ansible_user: "${process.env.USER}", install_homebrew: False }' -m include_role -a name=${pkg}`
|
await $`ANSIBLE_CONFIG=${process.env.HOME}/.local/share/ansible/ansible.cfg ansible 127.0.0.1 -v${verboseMode} -e '{ ansible_connection: "local", ansible_become_user: "root", ansible_user: "${process.env.USER}", install_homebrew: False }' -m include_role -a name=${pkg}`
|
||||||
log('success', 'Install', `${pkg} successfully installed via ${packageManager}`)
|
log('success', 'Install', `${pkg} successfully installed via ${packageManager}`)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log('error', 'Install Failure', `There was an error installing ${pkg} with Ansible`)
|
log('error', 'Install Failure', `There was an error installing ${pkg} with Ansible`)
|
||||||
|
@ -1528,10 +1529,10 @@ async function linkBin(installOrdersBinLink) {
|
||||||
}
|
}
|
||||||
for (const binLink of installOrdersBinLink) {
|
for (const binLink of installOrdersBinLink) {
|
||||||
const pkg = softwarePackages[binLink.package][binLink.preference]
|
const pkg = softwarePackages[binLink.package][binLink.preference]
|
||||||
if(!which.sync(binLink.bin, { nothrow: true })) {
|
if(typeof binLink.bin === 'string' && !which.sync(binLink.bin, { nothrow: true })) {
|
||||||
if (binLink.preference === 'flatpak' && flatpak) {
|
if (binLink.preference === 'flatpak' && flatpak) {
|
||||||
try {
|
try {
|
||||||
runCommand(`Adding bin link for ${pkg} (${binLink.bin})`, `bash -c 'test -d ${flatpakDir}/app/${pkg} && mkdir -p "${process.env.HOME}/.local/bin/flatpak" && echo "flatpak run ${pkg}" > "${process.env.HOME}/.local/bin/flatpak/${binLink.bin}"'`)
|
runCommand(`Adding bin link for ${pkg} (${binLink.bin})`, `bash -c 'test -d ${flatpakDir}/app/${pkg} && mkdir -p "${process.env.HOME}/.local/bin/flatpak" && echo "flatpak run ${pkg} \"$*\"" > "${process.env.HOME}/.local/bin/flatpak/${binLink.bin}"'`)
|
||||||
log('success', 'Bin', `Linked ~/.local/bin/flatpak/${binLink.bin} to the ${pkg} Flatpak`)
|
log('success', 'Bin', `Linked ~/.local/bin/flatpak/${binLink.bin} to the ${pkg} Flatpak`)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log('warn', 'Bin', `Expected flatpak directory not available - ${flatpakDir}/app/${pkg}`)
|
log('warn', 'Bin', `Expected flatpak directory not available - ${flatpakDir}/app/${pkg}`)
|
||||||
|
@ -1604,15 +1605,18 @@ async function installSoftware(pkgsToInstall) {
|
||||||
for (const service of installOrdersService) {
|
for (const service of installOrdersService) {
|
||||||
await updateService(service)
|
await updateService(service)
|
||||||
}
|
}
|
||||||
|
if (!binLinkRan) {
|
||||||
|
binLinkRan = true
|
||||||
|
log('info', 'Bin', 'Linking bin aliases to their installed packages')
|
||||||
|
await linkBin(installOrdersBinLink)
|
||||||
|
for (const script of installOrdersPost) {
|
||||||
|
await $`${script}`
|
||||||
|
}
|
||||||
|
}
|
||||||
log('info', 'Plugin', 'Installing package-specific plugins')
|
log('info', 'Plugin', 'Installing package-specific plugins')
|
||||||
for (const plugin of installOrdersPlugins) {
|
for (const plugin of installOrdersPlugins) {
|
||||||
await installPlugins(plugin)
|
await installPlugins(plugin)
|
||||||
}
|
}
|
||||||
log('info', 'Bin', 'Linking bin aliases to their installed packages')
|
|
||||||
await linkBin(installOrdersBinLink)
|
|
||||||
for (const script of installOrdersPost) {
|
|
||||||
await $`${script}`
|
|
||||||
}
|
|
||||||
log('info', 'Post-Install', `Running package manager post-installation steps`)
|
log('info', 'Post-Install', `Running package manager post-installation steps`)
|
||||||
for (const packageManager of packageManagers) {
|
for (const packageManager of packageManagers) {
|
||||||
await afterInstall(packageManager)
|
await afterInstall(packageManager)
|
||||||
|
|
|
@ -6761,6 +6761,7 @@ softwarePackages:
|
||||||
_name: Vagrant
|
_name: Vagrant
|
||||||
_snapClassic: true
|
_snapClassic: true
|
||||||
ansible: professormanhattan.vagrant
|
ansible: professormanhattan.vagrant
|
||||||
|
apt: vagrant
|
||||||
brew: hashicorp/tap/vagrant
|
brew: hashicorp/tap/vagrant
|
||||||
choco: vagrant
|
choco: vagrant
|
||||||
dnf: vagrant
|
dnf: vagrant
|
||||||
|
@ -6974,7 +6975,7 @@ softwarePackages:
|
||||||
ansible: professormanhattan.wails
|
ansible: professormanhattan.wails
|
||||||
go: github.com/wailsapp/wails/cmd/wails@latest
|
go: github.com/wailsapp/wails/cmd/wails@latest
|
||||||
warp:
|
warp:
|
||||||
_bin: null
|
_bin: warp-cli
|
||||||
_desc: '[Cloudflare WARP Client](https://cloudflarewarp.com/) is a free app that makes your Internet safer'
|
_desc: '[Cloudflare WARP Client](https://cloudflarewarp.com/) is a free app that makes your Internet safer'
|
||||||
_docs: null
|
_docs: null
|
||||||
_github: null
|
_github: null
|
||||||
|
|
Loading…
Reference in a new issue