Update 2 files
- /home/dot_local/bin/executable_install-program - /software.yml
This commit is contained in:
parent
8030a0f8f8
commit
8801c89daf
2 changed files with 25 additions and 20 deletions
|
@ -1529,29 +1529,33 @@ 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(typeof pkg === 'string' && !which.sync(binLink.bin, { nothrow: true })) {
|
if(typeof pkg === 'string') {
|
||||||
if (binLink.preference === 'flatpak' && flatpak) {
|
if(!which.sync(binLink.bin, { nothrow: true })) {
|
||||||
try {
|
if (binLink.preference === 'flatpak' && flatpak) {
|
||||||
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}" && chmod +x "${process.env.HOME}/.local/bin/flatpak/${binLink.bin}"'`)
|
try {
|
||||||
log('success', 'Bin', `Linked ~/.local/bin/flatpak/${binLink.bin} to the ${pkg} Flatpak`)
|
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}" && chmod +x "${process.env.HOME}/.local/bin/flatpak/${binLink.bin}"'`)
|
||||||
} catch (e) {
|
log('success', 'Bin', `Linked ~/.local/bin/flatpak/${binLink.bin} to the ${pkg} Flatpak`)
|
||||||
log('warn', 'Bin', `Expected flatpak directory not available - ${flatpakDir}/app/${pkg}`)
|
} catch (e) {
|
||||||
}
|
log('warn', 'Bin', `Expected flatpak directory not available - ${flatpakDir}/app/${pkg}`)
|
||||||
} else if (binLink.preference === 'cask') {
|
}
|
||||||
try {
|
} else if (binLink.preference === 'cask') {
|
||||||
const caskWhen = softwarePackages[binLink.package]["_when:cask"]
|
try {
|
||||||
const caskDir = caskWhen.replace('! test -d ', '').replace(/"/g, '')
|
const caskWhen = softwarePackages[binLink.package]["_when:cask"]
|
||||||
if (fileExists(caskDir)) {
|
const caskDir = caskWhen.replace('! test -d ', '').replace(/"/g, '')
|
||||||
runCommand(`Adding shortcut bin link for ${binLink.package}`, `bash -c 'mkdir -p "${process.env.HOME}/.local/bin/cask" && echo "open ${caskDir}" > "${process.env.HOME}/.local/bin/cask/${binLink.bin}" && chmod +x "${process.env.HOME}/.local/bin/cask/${binLink.bin}"'`)
|
if (fileExists(caskDir)) {
|
||||||
} else {
|
runCommand(`Adding shortcut bin link for ${binLink.package}`, `bash -c 'mkdir -p "${process.env.HOME}/.local/bin/cask" && echo "open ${caskDir}" > "${process.env.HOME}/.local/bin/cask/${binLink.bin}" && chmod +x "${process.env.HOME}/.local/bin/cask/${binLink.bin}"'`)
|
||||||
log('warn', 'Bin', `Expected Homebrew cask directory not found - ${pkg}`)
|
} else {
|
||||||
|
log('warn', 'Bin', `Expected Homebrew cask directory not found - ${pkg}`)
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log('warn', 'Bin', `Error creating bin shortcut link for ${pkg}`)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
log('warn', 'Bin', `Error creating bin shortcut link for ${pkg}`)
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log('info', 'Bin', `Link already exists for ${binLink.package}`)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log('info', 'Bin', `Link already exists for ${binLink.package}`)
|
log('info', 'Bin', `Skipping ${binLink.package} because there was more than one _bin value`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6902,7 +6902,8 @@ softwarePackages:
|
||||||
flatpak: org.videolan.VLC
|
flatpak: org.videolan.VLC
|
||||||
snap: vlc
|
snap: vlc
|
||||||
vmware:
|
vmware:
|
||||||
_bin: null
|
_bin: vmware
|
||||||
|
_bin:cask: vmware-id
|
||||||
_desc: '[VMWare Workstation](https://www.vmware.com/products/workstation-pro.html) (or [VMWare Fusion](https://www.vmware.com/products/fusion.html) in the case of macOS) is a hosted hypervisor that runs on x64 versions of Windows and Linux operating systems. It enables users to set up virtual machines on a single physical machine and use them simultaneously along with the host machine. It is similar to [VirtualBox](https://gitlab.com/megabyte-labs/ansible-roles/virtualbox).'
|
_desc: '[VMWare Workstation](https://www.vmware.com/products/workstation-pro.html) (or [VMWare Fusion](https://www.vmware.com/products/fusion.html) in the case of macOS) is a hosted hypervisor that runs on x64 versions of Windows and Linux operating systems. It enables users to set up virtual machines on a single physical machine and use them simultaneously along with the host machine. It is similar to [VirtualBox](https://gitlab.com/megabyte-labs/ansible-roles/virtualbox).'
|
||||||
_docs: https://docs.vmware.com/
|
_docs: https://docs.vmware.com/
|
||||||
_github: Not open-source
|
_github: Not open-source
|
||||||
|
|
Loading…
Reference in a new issue