fix: first add the key before adding the nala repository

This commit is contained in:
Amin Yahyaabadi 2022-07-27 16:38:10 -07:00
parent 7a90ebc5a0
commit 36734c34c3
6 changed files with 17 additions and 17 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/setup_cpp.mjs vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,6 +43,7 @@ import { addEnv } from "./utils/env/addEnv"
import { setupSevenZip } from "./sevenzip/sevenzip" import { setupSevenZip } from "./sevenzip/sevenzip"
import { setupGraphviz } from "./graphviz/graphviz" import { setupGraphviz } from "./graphviz/graphviz"
import { setupNala } from "./nala/nala" import { setupNala } from "./nala/nala"
import { isUbuntu } from "./utils/env/isUbuntu"
/** The setup functions */ /** The setup functions */
const setups = { const setups = {
@ -156,14 +157,14 @@ export async function main(args: string[]): Promise<number> {
// https://gitlab.com/volian/nala/-/issues/115 // https://gitlab.com/volian/nala/-/issues/115
// //
// if (isUbuntu()) { if (isUbuntu()) {
// try { try {
// setupNala(getVersion("nala", undefined, osVersion), "", arch) setupNala(getVersion("nala", undefined, osVersion), "", arch)
// } catch (err) { } catch (err) {
// warning((err as Error).toString()) warning((err as Error).toString())
// // continue with apt-get // continue with apt-get
// } }
// } }
// loop over the tools and run their setup function // loop over the tools and run their setup function
for (const tool of tools) { for (const tool of tools) {

View File

@ -22,16 +22,15 @@ export function setupNala(version: string, _setupDir: string, _arch: string) {
} }
// https://github.com/volitank/nala#-installation // https://github.com/volitank/nala#-installation
execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "A87015F3DA22D980"])
execSudo("/bin/bash", [
"-c",
`echo "deb http://deb.volian.org/volian/ scar main" | tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list`,
])
setupAptPack("wget") setupAptPack("wget")
execSudo("/bin/bash", [ execSudo("/bin/bash", [
"-c", "-c",
`wget -qO - https://deb.volian.org/volian/scar.key | tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null`, `wget -qO - https://deb.volian.org/volian/scar.key | tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null`,
]) ])
execSudo("/bin/bash", [
"-c",
`echo "deb http://deb.volian.org/volian/ scar main" | tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list`,
])
if (version !== "legacy") { if (version !== "legacy") {
setupAptPack("nala", undefined, [], true) setupAptPack("nala", undefined, [], true)