Update 2 files
- /software.yml - /home/dot_local/bin/executable_install-program
This commit is contained in:
parent
4b48d955af
commit
de3095b65d
2 changed files with 34 additions and 7 deletions
|
@ -86,6 +86,7 @@ function fileExists(pathToFile) {
|
||||||
|
|
||||||
let installData
|
let installData
|
||||||
let installOrders = {}
|
let installOrders = {}
|
||||||
|
let installMeta = {}
|
||||||
let binLinkRan = false
|
let binLinkRan = false
|
||||||
const installOrdersPre = []
|
const installOrdersPre = []
|
||||||
const installOrdersPost = []
|
const installOrdersPost = []
|
||||||
|
@ -401,12 +402,33 @@ async function updateInstallMaps(preference, packages, scopedPreference, pkg, pa
|
||||||
}
|
}
|
||||||
log('info', 'Match', `Found a match for the package \`${pkg}\` (${packageKey} via ${scopedPreference})`)
|
log('info', 'Match', `Found a match for the package \`${pkg}\` (${packageKey} via ${scopedPreference})`)
|
||||||
const newPackages = packages[scopedPreference]
|
const newPackages = packages[scopedPreference]
|
||||||
const newPkgs = typeof newPackages === 'string' ? [newPackages] : newPackages
|
const newPkgs = typeof newPackages === 'string' ? [{newPackages}] : newPackages
|
||||||
if (preference === 'snap' && softwarePackages[pkg]['_snapClassic'] === true) {
|
if (typeof newPackages === 'string') {
|
||||||
if (!installOrders[preference + '-classic']) {
|
installMeta[newPackages] = {
|
||||||
installOrders[preference + '-classic'] = []
|
preference,
|
||||||
|
packages,
|
||||||
|
scopedPreference,
|
||||||
|
pkg,
|
||||||
|
packageKey,
|
||||||
|
softwarePackages
|
||||||
}
|
}
|
||||||
installOrders[preference + '-classic'] = installOrders[preference].concat(newPkgs)
|
} else {
|
||||||
|
for (const dataKey in newPackages) {
|
||||||
|
installMeta[newPackages] = {
|
||||||
|
preference,
|
||||||
|
packages,
|
||||||
|
scopedPreference,
|
||||||
|
pkg,
|
||||||
|
packageKey,
|
||||||
|
softwarePackages
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (preference === 'snap' && softwarePackages[pkg]['_snapClassic'] === true) {
|
||||||
|
if (!installOrders['snap-classic']) {
|
||||||
|
installOrders['snap-classic'] = []
|
||||||
|
}
|
||||||
|
installOrders['snap-classic'] = installOrders[preference].concat(newPkgs)
|
||||||
} else {
|
} else {
|
||||||
installOrders[preference] = installOrders[preference].concat(newPkgs)
|
installOrders[preference] = installOrders[preference].concat(newPkgs)
|
||||||
}
|
}
|
||||||
|
@ -1143,7 +1165,11 @@ async function installPackageList(packageManager, packages) {
|
||||||
} else if (packageManager === 'binary') {
|
} else if (packageManager === 'binary') {
|
||||||
for (let pkg of packages) {
|
for (let pkg of packages) {
|
||||||
try {
|
try {
|
||||||
|
const bins = installData.softwarePackages.filter(x => x.appimage === pkg)
|
||||||
|
if (bins && bins[0]) {
|
||||||
|
const binName = bins[0]['_bin']
|
||||||
await $`TMP="$(mktemp)" && curl -sSL ${pkg} > "$TMP" && sudo mv "$TMP" /usr/local/src/${binName} && chmod +x /usr/local/src/${binName}`
|
await $`TMP="$(mktemp)" && curl -sSL ${pkg} > "$TMP" && sudo mv "$TMP" /usr/local/src/${binName} && chmod +x /usr/local/src/${binName}`
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log('error', 'Install Failure', `There was an error installing the binary release for ${pkg}`)
|
log('error', 'Install Failure', `There was an error installing the binary release for ${pkg}`)
|
||||||
console.error(e)
|
console.error(e)
|
||||||
|
|
|
@ -967,7 +967,8 @@ softwarePackages:
|
||||||
_name: CloudFlared
|
_name: CloudFlared
|
||||||
_type: cli
|
_type: cli
|
||||||
ansible: professormanhattan.cloudflared
|
ansible: professormanhattan.cloudflared
|
||||||
brew: cloudflare/cloudflare/cloudflared
|
binary:linux: https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
|
||||||
|
brew:darwin: cloudflare/cloudflare/cloudflared
|
||||||
github: github.com/cloudflare/cloudflared
|
github: github.com/cloudflare/cloudflared
|
||||||
cmake:
|
cmake:
|
||||||
_bin: cmake
|
_bin: cmake
|
||||||
|
|
Loading…
Reference in a new issue