-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfake-installer.js
More file actions
executable file
·34 lines (28 loc) · 891 Bytes
/
fake-installer.js
File metadata and controls
executable file
·34 lines (28 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env node
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
console.log('Welcome to the Fake Installer CLI! 🚀');
rl.question('Do you want to install FakeSoftware? (Y/N): ', (answer) => {
if (answer.toLowerCase() !== 'y') {
console.log('Installation aborted.');
rl.close();
return;
}
console.log('\nInstalling FakeSoftware...');
let progress = 0;
const progressInterval = setInterval(() => {
progress += 20;
process.stdout.write(
`\rProgress: [${'='.repeat(progress / 10)}${' '.repeat(10 - progress / 10)}] ${progress}%`,
);
if (progress >= 100) {
clearInterval(progressInterval);
console.log('\nInstallation complete! ✅');
console.log("You can now use FakeSoftware with 'fake-cli run'");
rl.close();
}
}, 1000);
});