mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-17 23:34:14 +01:00
Rename files
This commit is contained in:
30
ts/scripts/ensure-linux-file-permissions.node.ts
Normal file
30
ts/scripts/ensure-linux-file-permissions.node.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright 2025 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import path from 'node:path';
|
||||
import { execSync } from 'node:child_process';
|
||||
import type { AfterPackContext } from 'electron-builder';
|
||||
|
||||
const FILES = [
|
||||
'resources/org.signalapp.enable-backups.policy',
|
||||
'resources/org.signalapp.view-aep.policy',
|
||||
];
|
||||
|
||||
export async function afterPack({
|
||||
appOutDir,
|
||||
electronPlatformName,
|
||||
}: AfterPackContext): Promise<void> {
|
||||
if (electronPlatformName !== 'linux') {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Ensuring Linux file permissions');
|
||||
|
||||
for (const file of FILES) {
|
||||
const filePath = path.join(appOutDir, file);
|
||||
// u+rw g+r o+r
|
||||
const command = `chmod 644 "${filePath}"`;
|
||||
console.log(`Running: ${command}`);
|
||||
execSync(command);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user