Skip to content

Commit

Permalink
use repository url from repo.json
Browse files Browse the repository at this point in the history
  • Loading branch information
thunder-coding committed May 23, 2023
1 parent 67f32e8 commit dc530c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions generate-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const https = require("node:https");
const path = require("node:path");
const zlib = require("node:zlib");

const repositoryURL = "https://packages-cf.termux.dev/apt";
// TODO(@thunder-coding): Do not hardcode list of known architectures.
const archs = ["aarch64", "arm", "i686", "x86_64"];
const scriptdir = process.env["TERMUX_SCRIPTDIR"];
Expand All @@ -24,7 +23,7 @@ for (const repo_path in repoJSON) {
const repo = repoJSON[repo_path];
for (const arch of archs) {
https.get(
`${repositoryURL}/${repo.name}/dists/${repo.distribution}/Contents-${arch}.gz`,
`${repo.url}/dists/${repo.distribution}/Contents-${arch}.gz`,
(res) => {
if (res.statusCode != 200) {
throw new Error(`${res.url} returned ${res.statusCode}`);
Expand Down

0 comments on commit dc530c8

Please sign in to comment.