Skip to content

Commit 54a1aa0

Browse files
authored
generate-db.js: use TERMUX_PKG_CACHEDIR instead of TERMUX_SCRIPTDIR to customize repo.json
1 parent e69d713 commit 54a1aa0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

generate-db.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ const gunzipAsync = promisify(gunzip);
88

99
// TODO(@thunder-coding): Do not hardcode list of known architectures.
1010
const archs = ["aarch64", "arm", "i686", "x86_64"];
11-
const { TERMUX_SCRIPTDIR, TERMUX_PREFIX } = process.env;
11+
const { TERMUX_PKG_CACHEDIR, TERMUX_PREFIX } = process.env;
1212

13-
if (!TERMUX_SCRIPTDIR) {
14-
throw new Error('TERMUX_SCRIPTDIR environment variable is not defined');
13+
if (!TERMUX_PKG_CACHEDIR) {
14+
throw new Error('TERMUX_PKG_CACHEDIR environment variable is not defined');
1515
}
1616

1717
if (!TERMUX_PREFIX) {
1818
throw new Error('TERMUX_PREFIX environment variable is not defined');
1919
}
2020

2121
const binPrefix = TERMUX_PREFIX.substring(1) + '/bin/';
22-
const repos = JSON.parse(await readFile(join(TERMUX_SCRIPTDIR, 'repo.json')));
22+
const repos = JSON.parse(await readFile(join(TERMUX_PKG_CACHEDIR, 'repo.json')));
2323

2424
async function processRepo(repo) {
2525
for (const arch of archs) {

0 commit comments

Comments
 (0)