Spaces:
Paused
Paused
Update install_and_run.js
Browse files- install_and_run.js +2 -2
install_and_run.js
CHANGED
|
@@ -4,7 +4,7 @@ const path = require('path');
|
|
| 4 |
|
| 5 |
const zipUrl = process.env.ZIP_URL;
|
| 6 |
const downloadPath = '/tmp/app.zip';
|
| 7 |
-
const extractPath = '/app';
|
| 8 |
|
| 9 |
async function runCommand(command) {
|
| 10 |
return new Promise((resolve, reject) => {
|
|
@@ -33,7 +33,7 @@ async function main() {
|
|
| 33 |
await runCommand(`wget "${zipUrl}" -O ${downloadPath}`);
|
| 34 |
|
| 35 |
console.log(`Extracting ZIP file to: ${extractPath}`);
|
| 36 |
-
await runCommand(`unzip -o ${downloadPath} -d ${extractPath}`);
|
| 37 |
|
| 38 |
console.log("Removing downloaded ZIP file...");
|
| 39 |
await fs.unlink(downloadPath);
|
|
|
|
| 4 |
|
| 5 |
const zipUrl = process.env.ZIP_URL;
|
| 6 |
const downloadPath = '/tmp/app.zip';
|
| 7 |
+
const extractPath = '/app';
|
| 8 |
|
| 9 |
async function runCommand(command) {
|
| 10 |
return new Promise((resolve, reject) => {
|
|
|
|
| 33 |
await runCommand(`wget "${zipUrl}" -O ${downloadPath}`);
|
| 34 |
|
| 35 |
console.log(`Extracting ZIP file to: ${extractPath}`);
|
| 36 |
+
await runCommand(`unzip -o ${downloadPath} -d ${extractPath}`);
|
| 37 |
|
| 38 |
console.log("Removing downloaded ZIP file...");
|
| 39 |
await fs.unlink(downloadPath);
|