mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Make the openssl version a variable
At least just hardcode it once rather than three times
This commit is contained in:
parent
b0e15a9f0b
commit
18b8685e87
@ -92,7 +92,9 @@ async function getSqlCipher(hakEnv, moduleInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getOpenSsl(hakEnv, moduleInfo) {
|
async function getOpenSsl(hakEnv, moduleInfo) {
|
||||||
const openSslDir = path.join(moduleInfo.moduleDotHakDir, 'openssl-1.1.1d');
|
const osslVersion = '1.1.1f';
|
||||||
|
|
||||||
|
const openSslDir = path.join(moduleInfo.moduleDotHakDir, 'openssl-' + osslVersion);
|
||||||
|
|
||||||
let haveOpenSsl;
|
let haveOpenSsl;
|
||||||
try {
|
try {
|
||||||
@ -104,7 +106,7 @@ async function getOpenSsl(hakEnv, moduleInfo) {
|
|||||||
|
|
||||||
if (haveOpenSsl) return;
|
if (haveOpenSsl) return;
|
||||||
|
|
||||||
const openSslTarball = path.join(moduleInfo.moduleDotHakDir, 'openssl-1.1.1d.tar.gz');
|
const openSslTarball = path.join(moduleInfo.moduleDotHakDir, 'openssl-' + osslVersion + '.tar.gz');
|
||||||
let haveOpenSslTar;
|
let haveOpenSslTar;
|
||||||
try {
|
try {
|
||||||
await fsProm.stat(openSslTarball);
|
await fsProm.stat(openSslTarball);
|
||||||
@ -113,7 +115,7 @@ async function getOpenSsl(hakEnv, moduleInfo) {
|
|||||||
haveOpenSslTar = false;
|
haveOpenSslTar = false;
|
||||||
}
|
}
|
||||||
if (!haveOpenSslTar) {
|
if (!haveOpenSslTar) {
|
||||||
await needle('get', 'https://www.openssl.org/source/openssl-1.1.1f.tar.gz', {
|
await needle('get', 'https://www.openssl.org/source/openssl-' + osslVersion + '.tar.gz', {
|
||||||
follow: 10,
|
follow: 10,
|
||||||
output: openSslTarball,
|
output: openSslTarball,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user