2026-02-14 09:53:14 +01:00
|
|
|
import { spawn } from 'child_process';
|
|
|
|
|
import path from 'path';
|
2023-03-29 22:52:51 +02:00
|
|
|
|
|
|
|
|
if (process.env.BOX_ENV !== 'cloudron') {
|
|
|
|
|
console.error('!! This is only meant to be run with cloudron hotfix');
|
|
|
|
|
process.exit(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const NEW_BOX_SOURCE_DIR = '/tmp/box-src-hotfix';
|
|
|
|
|
|
|
|
|
|
console.log('=> Running installer.sh');
|
|
|
|
|
const installer = spawn(path.join(NEW_BOX_SOURCE_DIR, 'scripts/installer.sh'), []);
|
|
|
|
|
|
|
|
|
|
installer.stdout.pipe(process.stdout);
|
|
|
|
|
installer.stderr.pipe(process.stderr);
|
|
|
|
|
|
|
|
|
|
installer.on('exit', function (code) {
|
|
|
|
|
console.log('Finished with code', code);
|
|
|
|
|
process.exit(code);
|
|
|
|
|
});
|