Update 3 files

- /home/dot_local/bin/executable_install-program
- /home/private_dot_config/shell/exports.sh.tmpl
- /software.yml
This commit is contained in:
Brian Zalewski 2023-01-09 08:16:59 +00:00
parent 78f97d6d1e
commit 94f30ed1ef
3 changed files with 30 additions and 20 deletions

View file

@ -643,7 +643,7 @@ async function beforeInstall(packageManager) {
if (unbuffer) {
unbufferPrefix = 'unbuffer'
}
await $`ANSIBLE_CONFIG=${process.env.HOME}/.local/share/ansible/ansible.cfg ${unbufferPrefix} ansible 127.0.0.1 -vv -e '{ ansible_connection: "local", ansible_become_user: "${process.env.USER}", ansible_user: "${process.env.USER}", install_homebrew: False }' -m setup`
await $`ANSIBLE_CONFIG=${process.env.HOME}/.local/share/ansible/ansible.cfg ${unbufferPrefix} ansible 127.0.0.1 -e '{ ansible_connection: "local", ansible_become_user: "${process.env.USER}", ansible_user: "${process.env.USER}", install_homebrew: False }' -m setup`
} else if (packageManager === 'apk') {
await $`sudo apk update`
} else if (packageManager === 'apt') {
@ -1100,8 +1100,8 @@ async function installPackageList(packageManager, packages) {
if (unbuffer) {
unbufferPrefix = 'unbuffer'
}
const verboseMode = process.env.DEBUG_MODE === 'on' ? 'vv' : ''
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}`
const verboseMode = process.env.DEBUG_MODE === 'on' ? '-vvv' : ''
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}`
log('success', 'Install', `${pkg} successfully installed via ${packageManager}`)
} catch (e) {
log('error', 'Install Failure', `There was an error installing ${pkg} with Ansible`)
@ -1531,8 +1531,12 @@ async function linkBin(installOrdersBinLink) {
if(!which.sync(binLink.bin, { nothrow: true })) {
if (binLink.preference === 'flatpak' && flatpak) {
try {
await runSilentCommand(`test -d ${flatpakDir}/app/${pkg}`)
await $`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})`, `
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`)
} catch (e) {
log('warn', 'Bin', `Expected flatpak directory not available - ${flatpakDir}/app/${pkg}`)
}
@ -1540,10 +1544,16 @@ async function linkBin(installOrdersBinLink) {
try {
const caskWhen = softwarePackages[binLink.package]["_when:cask"]
const caskDir = caskWhen.replace('test -d ', '').replace(/"/g, '')
await $`test -d "${caskDir}"`
await $`mkdir -p "${process.env.HOME}/.local/bin/cask" && echo "open ${caskDir}" > "${process.env.HOME}/.local/bin/cask/${binLink.bin}"`
if (fileExists(caskDir)) {
runCommand(`Adding shortcut bin link for ${binLink.package}`, `
mkdir -p "${process.env.HOME}/.local/bin/cask"
echo "open ${caskDir}" > "${process.env.HOME}/.local/bin/cask/${binLink.bin}"
`)
} else {
log('warn', 'Bin', `Expected Homebrew cask directory not found - ${pkg}`)
}
} catch (e) {
log('warn', 'Bin', `Expected Homebrew cask directory not available - ${pkg}`)
log('warn', 'Bin', `Error creating bin shortcut link for ${pkg}`)
}
}
} else {

View file

@ -39,8 +39,10 @@ export PATH_TASK="$(which task)"
### PATH
export PATH="/opt/local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin/cask:$PATH"
export PATH="$HOME/.local/bin/docker:$PATH"
export PATH="$HOME/.local/bin/firejail:$PATH"
export PATH="$HOME/.local/bin/flatpak:$PATH"
export SSH_KEY_PATH="~/.ssh/id_rsa"
### Homebrew
@ -135,6 +137,13 @@ fi
### ffmpeg
export FFMPEG_DATADIR="$XDG_CONFIG_HOME/ffmpeg"
### Flatpak
if command -v flatpak > /dev/null; then
FLATPAK_INSTALLATIONS="$(flatpak --installations)"
export PATH="$FLATPAK_INSTALLATIONS/exports/bin:$PATH"
export XDG_DATA_DIRS="$HOME/.local/share/flatpak/exports/share:$FLATPAK_INSTALLATIONS/exports/share:$XDG_DATA_DIRS"
fi
### fzf
if command -v fd > /dev/null; then
export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix --hidden --follow --exclude .git'

View file

@ -7464,10 +7464,7 @@ softwarePlugins:
plugins:
- Microsoft.CST.AttackSurfaceAnalyzer.CLI
gh:
cmd: |
if [ -n "$GITHUB_TOKEN" ] && ! gh extension list | grep {PLUGIN}; then
gh extension install {PLUGIN}
fi
cmd: if [ -n "$GITHUB_TOKEN" ] && ! gh extension list | grep {PLUGIN}; then gh extension install {PLUGIN}; fi
plugins:
- dlvhdr/gh-dash
- github/gh-net
@ -7494,10 +7491,7 @@ softwarePlugins:
- view-allocations
- who-can
vagrant:
cmd: |
if ! vagrant plugin list | grep {PLUGIN}; then
vagrant plugin install {PLUGIN}
fi
cmd: if ! vagrant plugin list | grep {PLUGIN}; then vagrant plugin install {PLUGIN}; fi
plugins:
- vagrant-bindfs
- vagrant-digitalocean
@ -7508,10 +7502,7 @@ softwarePlugins:
- vagrant-vbguest
- vagrant-vmware-desktop
vscodium:
cmd: |
if test -n "$(find ~/.vscode/extensions -mindepth 1 -maxdepth 1 -type d -name "$(echo {PLUGIN} | tr "[:upper:]" "[:lower:]")*" -print -quit)"; then
code --install-extension "$(echo {PLUGIN} | tr "[:upper:]" "[:lower:]")"
fi
cmd: if test -n "$(find ~/.vscode/extensions -mindepth 1 -maxdepth 1 -type d -name "$(echo {PLUGIN} | tr "[:upper:]" "[:lower:]")*" -print -quit)"; then codium --install-extension "$(echo {PLUGIN} | tr "[:upper:]" "[:lower:]")"; fi
plugins:
- Angular.ng-template
- attilabuti.vscode-mjml