penguins-eggs 25.11.21 → 25.11.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oclif.manifest.json +53 -41
- package/README.md +146 -64
- package/README.pdf +21400 -3491
- package/addons/eggs/theme/livecd/full.grub.main.cfg +39 -4
- package/addons/eggs/theme/livecd/full.isolinux.main.cfg +47 -4
- package/bin/run.js +11 -0
- package/conf/derivatives.yaml +2 -1
- package/dist/appimage/dependency-manager.d.ts +31 -0
- package/dist/appimage/dependency-manager.js +292 -0
- package/dist/appimage/first-run-check.js +3 -3
- package/dist/bin/run.js +11 -0
- package/dist/classes/cli-autologin.js +1 -1
- package/dist/classes/daddy.js +11 -11
- package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +7 -0
- package/dist/classes/incubation/fisherman-helper/initcpio.js +7 -0
- package/dist/classes/incubation/fisherman.js +0 -2
- package/dist/classes/network.d.ts +1 -1
- package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -1
- package/dist/classes/ovary.d/edit-live-fs.js +129 -93
- package/dist/classes/ovary.d/fertilization.js +1 -1
- package/dist/classes/ovary.d/xorriso-command.js +1 -5
- package/dist/classes/pacman.d.ts +21 -7
- package/dist/classes/pacman.js +53 -32
- package/dist/classes/utils.d.ts +1 -5
- package/dist/classes/utils.js +15 -12
- package/dist/commands/config.js +3 -14
- package/dist/commands/cuckoo.js +1 -1
- package/dist/commands/{setup.d.ts → setup/install.d.ts} +1 -5
- package/dist/commands/setup/install.js +71 -0
- package/dist/commands/setup/purge.d.ts +17 -0
- package/dist/commands/setup/purge.js +71 -0
- package/dist/commands/update.d.ts +15 -0
- package/dist/commands/update.js +74 -6
- package/dist/krill/components/title.js +4 -4
- package/dist/lib/utils.js +0 -19
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +29 -17
- package/package.json +8 -9
- package/scripts/_eggs +35 -7
- package/scripts/eggs.bash +2 -1
- package/dist/appimage/prerequisites.d.ts +0 -34
- package/dist/appimage/prerequisites.js +0 -350
- package/dist/commands/setup.js +0 -90
- package/scripts/appimage-build.sh +0 -152
- package/scripts/appimage-install.sh +0 -43
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*/
|
|
4
|
-
export declare class Prerequisites {
|
|
5
|
-
private distro;
|
|
6
|
-
constructor();
|
|
7
|
-
/**
|
|
8
|
-
* install
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
install(force?: boolean): Promise<boolean>;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
check(): boolean;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param packages
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
private getInstallCommand;
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param pkg
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
private isPackageInstalled;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
private getPackagesForDistro;
|
|
34
|
-
}
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/appimage/prerequisites.ts
|
|
3
|
-
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import { execSync } from 'node:child_process';
|
|
9
|
-
import Utils from '../classes/utils.js';
|
|
10
|
-
import Distro from '../classes/distro.js';
|
|
11
|
-
import Diversions from '../classes/diversions.js';
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export class Prerequisites {
|
|
16
|
-
distro;
|
|
17
|
-
constructor() {
|
|
18
|
-
this.distro = new Distro();
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* install
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
async install(force = false) {
|
|
25
|
-
const packages = this.getPackagesForDistro();
|
|
26
|
-
if (packages.length === 0) {
|
|
27
|
-
console.log('ERROR: Unsupported distribution for automatic setup');
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
let missing = packages.filter(pkg => !this.isPackageInstalled(pkg));
|
|
31
|
-
if (force) {
|
|
32
|
-
missing = packages;
|
|
33
|
-
}
|
|
34
|
-
console.log('');
|
|
35
|
-
console.log('The following packages will be installed/reinstalled:');
|
|
36
|
-
console.log(`${missing.join(', ')}`);
|
|
37
|
-
console.log('');
|
|
38
|
-
if (await Utils.customConfirm('Select yes to continue...')) {
|
|
39
|
-
const installCmd = this.getInstallCommand(missing, force);
|
|
40
|
-
Utils.titles(installCmd);
|
|
41
|
-
try {
|
|
42
|
-
console.log('Installing packages (this may take a few minutes)...');
|
|
43
|
-
//execSync(installCmd, { stdio: 'inherit' })
|
|
44
|
-
execSync(installCmd, { stdio: 'ignore' });
|
|
45
|
-
console.log('');
|
|
46
|
-
console.log('SUCCESS: Prerequisites installed successfully!');
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
console.log('');
|
|
51
|
-
console.log('ERROR: Failed to install prerequisites');
|
|
52
|
-
console.log('Error details:', error instanceof Error ? error.message : 'Unknown error');
|
|
53
|
-
console.log('');
|
|
54
|
-
console.log('Please check your system and try again.');
|
|
55
|
-
console.log('You can also install prerequisites manually using your package manager.');
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @returns
|
|
64
|
-
*/
|
|
65
|
-
check() {
|
|
66
|
-
try {
|
|
67
|
-
const packages = this.getPackagesForDistro();
|
|
68
|
-
if (packages.length === 0) {
|
|
69
|
-
console.log('WARNING: Unsupported distribution - cannot check prerequisites');
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
const missing = packages.filter(pkg => !this.isPackageInstalled(pkg));
|
|
73
|
-
if (missing.length > 0) {
|
|
74
|
-
console.log(`MISSING: ${missing.length} of ${packages.length} packages`);
|
|
75
|
-
console.log(`${missing.join(', ')}`);
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
console.log(`SUCCESS: All ${packages.length} packages are installed`);
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
console.log('ERROR: Failed to check prerequisites');
|
|
83
|
-
console.log('Error details:', error instanceof Error ? error.message : 'Unknown error');
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
* @param packages
|
|
90
|
-
* @returns
|
|
91
|
-
*/
|
|
92
|
-
getInstallCommand(packages, forceReinstall = false) {
|
|
93
|
-
const packagesStr = packages.join(' ');
|
|
94
|
-
switch (this.distro.familyId) {
|
|
95
|
-
case 'debian':
|
|
96
|
-
// apt richiede il flag --reinstall per forzare la sovrascrittura
|
|
97
|
-
const aptCmd = forceReinstall ? 'install --reinstall' : 'install';
|
|
98
|
-
return `sudo apt-get update && sudo apt-get ${aptCmd} -y ${packagesStr}`;
|
|
99
|
-
case 'archlinux':
|
|
100
|
-
// Pacman -S reinstalla di default.
|
|
101
|
-
// (Se volessimo evitare reinstallazioni su Arch useremmo --needed, ma qui va bene così)
|
|
102
|
-
return `sudo pacman -S --noconfirm ${packagesStr}`;
|
|
103
|
-
case 'fedora':
|
|
104
|
-
// dnf ha un comando specifico 'reinstall'
|
|
105
|
-
const dnfCmd = forceReinstall ? 'reinstall' : 'install';
|
|
106
|
-
return `sudo dnf ${dnfCmd} -y ${packagesStr}`;
|
|
107
|
-
default:
|
|
108
|
-
return `echo "Unsupported distribution: ${this.distro.familyId}"`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
*
|
|
113
|
-
* @param pkg
|
|
114
|
-
* @returns
|
|
115
|
-
*/
|
|
116
|
-
isPackageInstalled(pkg) {
|
|
117
|
-
try {
|
|
118
|
-
switch (this.distro.familyId) {
|
|
119
|
-
case 'debian':
|
|
120
|
-
// Verifica se il pacchetto è installato
|
|
121
|
-
execSync(`dpkg -s ${pkg}`, { stdio: 'ignore' });
|
|
122
|
-
return true;
|
|
123
|
-
case 'archlinux':
|
|
124
|
-
// Verifica se il pacchetto è installato su Arch
|
|
125
|
-
execSync(`pacman -Q ${pkg}`, { stdio: 'ignore' });
|
|
126
|
-
return true;
|
|
127
|
-
case 'fedora':
|
|
128
|
-
// Verifica se il pacchetto è installato su fedora/Fedora
|
|
129
|
-
execSync(`rpm -q ${pkg}`, { stdio: 'ignore' });
|
|
130
|
-
return true;
|
|
131
|
-
default:
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
return false;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
*
|
|
141
|
-
* @returns
|
|
142
|
-
*/
|
|
143
|
-
getPackagesForDistro() {
|
|
144
|
-
/**
|
|
145
|
-
* normalize as packageList
|
|
146
|
-
*/
|
|
147
|
-
let packagesList = this.distro.familyId;
|
|
148
|
-
if (this.distro.familyId === 'el9') {
|
|
149
|
-
packagesList = 'fedora';
|
|
150
|
-
}
|
|
151
|
-
if (this.distro.familyId === 'archlinux' && Diversions.isManjaroBased(this.distro.distroLike)) {
|
|
152
|
-
packagesList = 'manjaro';
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* we select from packageList
|
|
156
|
-
*/
|
|
157
|
-
if (packagesList === 'alpine') {
|
|
158
|
-
return [
|
|
159
|
-
'alpine-conf',
|
|
160
|
-
'apk-tools',
|
|
161
|
-
'bash',
|
|
162
|
-
'bash-completion',
|
|
163
|
-
'cryptsetup',
|
|
164
|
-
'curl',
|
|
165
|
-
'device-mapper-libs',
|
|
166
|
-
'dosfstools',
|
|
167
|
-
// 'fuse',
|
|
168
|
-
'git',
|
|
169
|
-
'grub-bios',
|
|
170
|
-
'grub-efi',
|
|
171
|
-
'jq',
|
|
172
|
-
'lsblk',
|
|
173
|
-
'lvm2',
|
|
174
|
-
'mkinitfs',
|
|
175
|
-
'musl-locales',
|
|
176
|
-
// 'nodejs',
|
|
177
|
-
'parted',
|
|
178
|
-
'polkit',
|
|
179
|
-
'rsync',
|
|
180
|
-
'shadow',
|
|
181
|
-
'squashfs-tools',
|
|
182
|
-
'sshfs',
|
|
183
|
-
'xorriso',
|
|
184
|
-
'zstd',
|
|
185
|
-
'libc6-compat',
|
|
186
|
-
];
|
|
187
|
-
}
|
|
188
|
-
else if (packagesList === 'archlinux') {
|
|
189
|
-
return [
|
|
190
|
-
'arch-install-scripts',
|
|
191
|
-
'cryptsetup',
|
|
192
|
-
'curl',
|
|
193
|
-
'dosfstools',
|
|
194
|
-
'efibootmgr',
|
|
195
|
-
'erofs-utils',
|
|
196
|
-
'findutils',
|
|
197
|
-
// 'fuse2',
|
|
198
|
-
'git',
|
|
199
|
-
'gnupg',
|
|
200
|
-
'grub',
|
|
201
|
-
'jq',
|
|
202
|
-
'libarchive',
|
|
203
|
-
'libisoburn',
|
|
204
|
-
'lvm2',
|
|
205
|
-
'mkinitcpio-archiso',
|
|
206
|
-
'mkinitcpio-nfs-utils',
|
|
207
|
-
'mtools',
|
|
208
|
-
'nbd',
|
|
209
|
-
// 'nodejs',
|
|
210
|
-
'pacman-contrib',
|
|
211
|
-
'parted',
|
|
212
|
-
'polkit',
|
|
213
|
-
'procps-ng',
|
|
214
|
-
'pv',
|
|
215
|
-
'python',
|
|
216
|
-
'rsync',
|
|
217
|
-
'squashfs-tools',
|
|
218
|
-
'sshfs',
|
|
219
|
-
'syslinux',
|
|
220
|
-
'wget',
|
|
221
|
-
'xdg-utils',
|
|
222
|
-
];
|
|
223
|
-
}
|
|
224
|
-
else if (packagesList === 'debian') {
|
|
225
|
-
let debianPackages = [
|
|
226
|
-
'cryptsetup',
|
|
227
|
-
'curl',
|
|
228
|
-
'dosfstools',
|
|
229
|
-
'dpkg-dev',
|
|
230
|
-
'git',
|
|
231
|
-
'gnupg',
|
|
232
|
-
'grub-efi-amd64-bin',
|
|
233
|
-
'grub-pc-bin',
|
|
234
|
-
'grub2-common',
|
|
235
|
-
'ipxe',
|
|
236
|
-
'isolinux',
|
|
237
|
-
'jq',
|
|
238
|
-
'live-boot',
|
|
239
|
-
'live-boot-initramfs-tools',
|
|
240
|
-
'live-config',
|
|
241
|
-
'lvm2',
|
|
242
|
-
'parted',
|
|
243
|
-
'rsync',
|
|
244
|
-
'squashfs-tools',
|
|
245
|
-
'sshfs',
|
|
246
|
-
'syslinux-common',
|
|
247
|
-
'syslinux',
|
|
248
|
-
'xorriso',
|
|
249
|
-
];
|
|
250
|
-
if (Utils.isSystemd()) {
|
|
251
|
-
debianPackages.push('live-config-systemd');
|
|
252
|
-
}
|
|
253
|
-
else {
|
|
254
|
-
debianPackages.push('live-config-sysvinit');
|
|
255
|
-
}
|
|
256
|
-
debianPackages.sort();
|
|
257
|
-
return debianPackages;
|
|
258
|
-
}
|
|
259
|
-
else if (packagesList === 'fedora') {
|
|
260
|
-
return [
|
|
261
|
-
'cryptsetup',
|
|
262
|
-
'curl',
|
|
263
|
-
'device-mapper',
|
|
264
|
-
'dosfstools',
|
|
265
|
-
'dracut-live',
|
|
266
|
-
'dracut',
|
|
267
|
-
'efibootmgr',
|
|
268
|
-
// 'fuse',
|
|
269
|
-
'git',
|
|
270
|
-
'jq',
|
|
271
|
-
'lvm2',
|
|
272
|
-
// 'nodejs',
|
|
273
|
-
'nvme-cli',
|
|
274
|
-
'parted',
|
|
275
|
-
'polkit',
|
|
276
|
-
'rsync',
|
|
277
|
-
'squashfs-tools',
|
|
278
|
-
'sshfs',
|
|
279
|
-
'wget',
|
|
280
|
-
'xdg-utils',
|
|
281
|
-
'xorriso',
|
|
282
|
-
'zstd',
|
|
283
|
-
];
|
|
284
|
-
}
|
|
285
|
-
else if (packagesList === 'manjaro') {
|
|
286
|
-
return [
|
|
287
|
-
'arch-install-scripts',
|
|
288
|
-
'curl',
|
|
289
|
-
'dosfstools',
|
|
290
|
-
'efibootmgr',
|
|
291
|
-
'erofs-utils',
|
|
292
|
-
'findutils',
|
|
293
|
-
// 'fuse2',
|
|
294
|
-
'git',
|
|
295
|
-
'gnupg',
|
|
296
|
-
'grub',
|
|
297
|
-
'jq',
|
|
298
|
-
'libarchive',
|
|
299
|
-
'libisoburn',
|
|
300
|
-
'lvm2',
|
|
301
|
-
'manjaro-tools-iso',
|
|
302
|
-
'mkinitcpio-nfs-utils',
|
|
303
|
-
'mtools',
|
|
304
|
-
'nbd',
|
|
305
|
-
// 'nodejs',
|
|
306
|
-
'pacman-contrib',
|
|
307
|
-
'parted',
|
|
308
|
-
'polkit',
|
|
309
|
-
'procps-ng',
|
|
310
|
-
'pv',
|
|
311
|
-
'python',
|
|
312
|
-
'rsync',
|
|
313
|
-
'squashfs-tools',
|
|
314
|
-
'sshfs',
|
|
315
|
-
'wget',
|
|
316
|
-
'xdg-utils',
|
|
317
|
-
];
|
|
318
|
-
}
|
|
319
|
-
else if (packagesList === 'opensuse') {
|
|
320
|
-
return [
|
|
321
|
-
'cryptsetup',
|
|
322
|
-
'curl',
|
|
323
|
-
'device-mapper',
|
|
324
|
-
'dosfstools',
|
|
325
|
-
'dracut-kiwi-live',
|
|
326
|
-
'dracut',
|
|
327
|
-
'efibootmgr',
|
|
328
|
-
// 'fuse-sshfs',
|
|
329
|
-
// 'fuse',
|
|
330
|
-
'git',
|
|
331
|
-
'jq',
|
|
332
|
-
'lvm2',
|
|
333
|
-
// 'nodejs',
|
|
334
|
-
'nvme-cli',
|
|
335
|
-
'parted',
|
|
336
|
-
'polkit',
|
|
337
|
-
'rsync',
|
|
338
|
-
'squashfs-tools',
|
|
339
|
-
'wget',
|
|
340
|
-
'xdg-utils',
|
|
341
|
-
'xorriso',
|
|
342
|
-
'zstd',
|
|
343
|
-
];
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
console.log(`This distro ${this.distro.distroId}/${this.distro.codenameId} is not yet recognized!`);
|
|
347
|
-
return [];
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
package/dist/commands/setup.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/commands/setup.ts
|
|
3
|
-
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import Distro from '../classes/distro.js';
|
|
9
|
-
import Utils from '../classes/utils.js';
|
|
10
|
-
import Pacman from '../classes/pacman.js';
|
|
11
|
-
import { Prerequisites } from '../appimage/prerequisites.js';
|
|
12
|
-
import { Command, Flags } from '@oclif/core';
|
|
13
|
-
export default class Setup extends Command {
|
|
14
|
-
static description = 'Automatically check and install system prerequisites';
|
|
15
|
-
static flags = {
|
|
16
|
-
check: Flags.boolean({ char: 'c', description: 'check status only, do not install' }),
|
|
17
|
-
force: Flags.boolean({ char: 'f', description: 'force installation even if already installed' }),
|
|
18
|
-
};
|
|
19
|
-
static examples = [
|
|
20
|
-
'sudo eggs setup # install prerequisites',
|
|
21
|
-
'sudo eggs setup --check # check prerequisites presence',
|
|
22
|
-
'sudo eggs setup --force # force prerequisites install',
|
|
23
|
-
];
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
async run() {
|
|
29
|
-
Utils.titles(this.id + ' ' + this.argv);
|
|
30
|
-
/**
|
|
31
|
-
* continue only on AppImage
|
|
32
|
-
*/
|
|
33
|
-
if (!Utils.isAppImage()) {
|
|
34
|
-
console.log("The eggs setup command is only applicable on the AppImage version.");
|
|
35
|
-
process.exit();
|
|
36
|
-
}
|
|
37
|
-
const distro = new Distro();
|
|
38
|
-
const osInfo = Utils.getOsRelease();
|
|
39
|
-
const codenameId = osInfo.VERSION_CODENAME;
|
|
40
|
-
const releaseId = osInfo.VERSION_ID;
|
|
41
|
-
const distroId = osInfo.ID;
|
|
42
|
-
console.log(`AppImage running on: ${distroId}/${codenameId} compatible: ${distro.distroLike}/${distro.distroUniqueId} family: ${distro.familyId}`);
|
|
43
|
-
const { flags } = await this.parse(Setup);
|
|
44
|
-
const prerequisites = new Prerequisites();
|
|
45
|
-
if (Utils.isRoot()) {
|
|
46
|
-
// Install autocomplete e manPages
|
|
47
|
-
await Pacman.autocompleteInstall();
|
|
48
|
-
await Pacman.manPageInstall();
|
|
49
|
-
if (flags.check) {
|
|
50
|
-
this.log('Checking system prerequisites...');
|
|
51
|
-
const allInstalled = prerequisites.check();
|
|
52
|
-
if (allInstalled) {
|
|
53
|
-
this.log('SUCCESS: All prerequisites are installed');
|
|
54
|
-
this.log('Your system is ready for penguins-eggs!');
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this.log('WARNING: Some prerequisites are missing');
|
|
58
|
-
this.log('Run: eggs setup (without --check) to install them automatically');
|
|
59
|
-
}
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
// Setup automatico: check + install
|
|
63
|
-
this.log('Checking current system status...');
|
|
64
|
-
const allInstalled = prerequisites.check();
|
|
65
|
-
// Se tutto è installato esce, e non --force
|
|
66
|
-
if (allInstalled && !flags.force) {
|
|
67
|
-
this.log('SUCCESS: All prerequisites are already installed');
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
// reinstalla
|
|
71
|
-
if (allInstalled && flags.force) {
|
|
72
|
-
this.log('Reinstalling prerequisites.');
|
|
73
|
-
}
|
|
74
|
-
const success = await prerequisites.install(flags.force);
|
|
75
|
-
if (success) {
|
|
76
|
-
this.log('');
|
|
77
|
-
this.log('SUCCESS: penguins-eggs setup completed!');
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
this.log('');
|
|
81
|
-
this.log('ERROR: Setup failed');
|
|
82
|
-
this.log('Please check your system and try again.');
|
|
83
|
-
this.log('You can also install prerequisites manually using your package manager.');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
Utils.useRoot(this.id);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -e
|
|
3
|
-
|
|
4
|
-
echo "Building Penguins Eggs AppImage..."
|
|
5
|
-
|
|
6
|
-
APP_NAME="penguins-eggs"
|
|
7
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
8
|
-
ARCH="x86_64"
|
|
9
|
-
|
|
10
|
-
# Verifica build
|
|
11
|
-
if [ ! -f "dist/bin/dev.js" ]; then
|
|
12
|
-
echo "ERROR: Build not found. Run: pnpm run build"
|
|
13
|
-
exit 1
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
echo "SUCCESS: Build found: dist/bin/dev.js"
|
|
17
|
-
|
|
18
|
-
# Verifica esistenza cartella appimage
|
|
19
|
-
if [ ! -d "appimage" ]; then
|
|
20
|
-
echo "ERROR: appimage/ directory not found"
|
|
21
|
-
echo "Please create appimage/ with required files"
|
|
22
|
-
exit 1
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
# Verifica file richiesti in appimage/
|
|
26
|
-
if [ ! -f "appimage/AppRun" ]; then
|
|
27
|
-
echo "ERROR: appimage/AppRun not found"
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
if [ ! -f "appimage/penguins-eggs.desktop" ]; then
|
|
32
|
-
echo "ERROR: appimage/penguins-eggs.desktop not found"
|
|
33
|
-
exit 1
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
# Verifica FUSE
|
|
37
|
-
echo "Checking system requirements..."
|
|
38
|
-
if ! ldconfig -p | grep -q libfuse.so.2; then
|
|
39
|
-
echo "WARNING: libfuse2 not found. AppImage may not run properly."
|
|
40
|
-
echo "Please install FUSE:"
|
|
41
|
-
echo " Alpine: sudo apk add fuse"
|
|
42
|
-
echo " Arch: sudo pacman -S fuse2"
|
|
43
|
-
echo " Debian/Ubuntu: sudo apt-get install fuse libfuse2"
|
|
44
|
-
echo " Fedora/RHEL: sudo dnf install fuse fuse-libs"
|
|
45
|
-
echo " Opensuse: sudo zypper install fuse fuse-libs"
|
|
46
|
-
echo ""
|
|
47
|
-
echo "Continuing with build anyway..."
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
# Pulisci e crea struttura
|
|
51
|
-
rm -rf AppDir
|
|
52
|
-
mkdir -p AppDir/usr/lib/penguins-eggs
|
|
53
|
-
mkdir -p AppDir/usr/bin
|
|
54
|
-
mkdir -p AppDir/usr/share/applications
|
|
55
|
-
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
|
56
|
-
|
|
57
|
-
# Scarica appimagetool
|
|
58
|
-
if [ ! -f "appimagetool" ]; then
|
|
59
|
-
echo "Downloading appimagetool..."
|
|
60
|
-
wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage -O appimagetool
|
|
61
|
-
chmod +x appimagetool
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
# Copia il progetto
|
|
65
|
-
echo "Copying project files..."
|
|
66
|
-
for dir in dist node_modules assets addons bin conf dracut manpages mkinitcpio mkinitfs scripts src templates; do
|
|
67
|
-
if [ -d "$dir" ]; then
|
|
68
|
-
echo " Copying: $dir"
|
|
69
|
-
cp -r "$dir" AppDir/usr/lib/penguins-eggs/
|
|
70
|
-
fi
|
|
71
|
-
done
|
|
72
|
-
|
|
73
|
-
# Scarica e installa Node.js
|
|
74
|
-
NODE_VERSION="22.21.1"
|
|
75
|
-
echo "Downloading Node.js v$NODE_VERSION..."
|
|
76
|
-
wget -q https://nodejs.org/dist/latest-v22.x/node-v$NODE_VERSION-linux-x64.tar.xz -O nodejs.tar.xz
|
|
77
|
-
tar -xf nodejs.tar.xz
|
|
78
|
-
mkdir -p AppDir/usr/lib/penguins-eggs/node
|
|
79
|
-
cp -r node-v$NODE_VERSION-linux-x64/* AppDir/usr/lib/penguins-eggs/node/
|
|
80
|
-
rm -rf node-v$NODE_VERSION-linux-x64 nodejs.tar.xz
|
|
81
|
-
|
|
82
|
-
# Bootloaders
|
|
83
|
-
mkdir -p AppDir/usr/lib/penguins-eggs/bootloaders
|
|
84
|
-
echo "Downloading bootloaders..."
|
|
85
|
-
wget -q -O bootloaders.tar.gz "https://github.com/pieroproietti/penguins-bootloaders/releases/download/v25.9.8/bootloaders.tar.gz"
|
|
86
|
-
echo "Extracting bootloaders..."
|
|
87
|
-
tar -xzf bootloaders.tar.gz -C AppDir/usr/lib/penguins-eggs/bootloaders --strip-components=1
|
|
88
|
-
rm -f bootloaders.tar.gz
|
|
89
|
-
|
|
90
|
-
# Copia package.json
|
|
91
|
-
cp package.json AppDir/usr/lib/penguins-eggs/ 2>/dev/null || true
|
|
92
|
-
|
|
93
|
-
# COPIA i file dall'appimage/
|
|
94
|
-
|
|
95
|
-
# Copia e aggiorna metadati AppData
|
|
96
|
-
if [ -f "appimage/penguins-eggs.appdata.xml" ]; then
|
|
97
|
-
mkdir -p AppDir/usr/share/metainfo
|
|
98
|
-
|
|
99
|
-
# Aggiorna automaticamente versione e data
|
|
100
|
-
CURRENT_DATE=$(date +%Y-%m-%d)
|
|
101
|
-
sed -e "s|%VERSION%|$VERSION|g" \
|
|
102
|
-
-e "s|%DATE%|$CURRENT_DATE|g" \
|
|
103
|
-
"appimage/penguins-eggs.appdata.xml" > AppDir/usr/share/metainfo/penguins-eggs.appdata.xml
|
|
104
|
-
|
|
105
|
-
echo "AppData metadata updated: version $VERSION, date $CURRENT_DATE"
|
|
106
|
-
else
|
|
107
|
-
echo "WARNING: AppData file not found at appimage/penguins-eggs.appdata.xml"
|
|
108
|
-
fi
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
# AppRun
|
|
112
|
-
cp appimage/AppRun AppDir/
|
|
113
|
-
chmod +x AppDir/AppRun
|
|
114
|
-
|
|
115
|
-
# penguins-eggs.desktop
|
|
116
|
-
cp appimage/penguins-eggs.desktop AppDir/
|
|
117
|
-
cp appimage/penguins-eggs.desktop AppDir/usr/share/applications/
|
|
118
|
-
|
|
119
|
-
# penguins-eggs.png
|
|
120
|
-
cp appimage/penguins-eggs.png AppDir/
|
|
121
|
-
cp appimage/penguins-eggs.png AppDir/usr/share/icons/hicolor/256x256/apps/
|
|
122
|
-
|
|
123
|
-
# Link per l'eseguibile
|
|
124
|
-
ln -sf ../lib/penguins-eggs/dist/bin/dev.js AppDir/usr/bin/eggs
|
|
125
|
-
|
|
126
|
-
# Verifica file richiesti
|
|
127
|
-
echo "Checking required AppDir files:"
|
|
128
|
-
ls -la AppDir/AppRun
|
|
129
|
-
ls -la AppDir/penguins-eggs.desktop
|
|
130
|
-
ls -la AppDir/penguins-eggs.png
|
|
131
|
-
|
|
132
|
-
# Crea AppImage
|
|
133
|
-
echo "Creating AppImage..."
|
|
134
|
-
ARCH=$ARCH ./appimagetool AppDir "${APP_NAME}-${VERSION}-${ARCH}.AppImage"
|
|
135
|
-
|
|
136
|
-
# Test
|
|
137
|
-
echo "Testing AppImage..."
|
|
138
|
-
chmod +x "${APP_NAME}-${VERSION}-${ARCH}.AppImage"
|
|
139
|
-
|
|
140
|
-
if command -v fusermount &> /dev/null || command -v fusermount3 &> /dev/null; then
|
|
141
|
-
if ./"${APP_NAME}-${VERSION}-${ARCH}.AppImage" --version; then
|
|
142
|
-
echo "SUCCESS: AppImage working correctly!"
|
|
143
|
-
else
|
|
144
|
-
echo "WARNING: AppImage test failed"
|
|
145
|
-
fi
|
|
146
|
-
else
|
|
147
|
-
echo "WARNING: Cannot test AppImage without FUSE"
|
|
148
|
-
fi
|
|
149
|
-
|
|
150
|
-
echo ""
|
|
151
|
-
echo "AppImage created: ${APP_NAME}-${VERSION}-${ARCH}.AppImage"
|
|
152
|
-
echo "Size: $(du -h "${APP_NAME}-${VERSION}-${ARCH}.AppImage" | cut -f1)"
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Script di installazione system-wide per penguins-eggs AppImage
|
|
3
|
-
|
|
4
|
-
APP_NAME="penguins-eggs"
|
|
5
|
-
INSTALL_DIR="/usr/local/bin"
|
|
6
|
-
|
|
7
|
-
echo "Installing Penguins Eggs system-wide..."
|
|
8
|
-
|
|
9
|
-
# Cerca l'AppImage nella directory corrente
|
|
10
|
-
APPIMAGE_FILE=$(find . -maxdepth 1 -name "${APP_NAME}-*-x86_64.AppImage" | head -1)
|
|
11
|
-
|
|
12
|
-
if [ -z "$APPIMAGE_FILE" ]; then
|
|
13
|
-
echo "ERROR: AppImage not found in current directory."
|
|
14
|
-
echo "Please download it from: https://github.com/pieroproietti/penguins-eggs/releases"
|
|
15
|
-
echo "Or run from the directory containing the AppImage file."
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
# Rendi eseguibile e installa system-wide
|
|
20
|
-
echo "Installing $APPIMAGE_FILE to $INSTALL_DIR/eggs"
|
|
21
|
-
sudo chmod +x "$APPIMAGE_FILE"
|
|
22
|
-
sudo cp "$APPIMAGE_FILE" "$INSTALL_DIR/eggs"
|
|
23
|
-
|
|
24
|
-
# Nota sulle completion (rimosse)
|
|
25
|
-
echo ""
|
|
26
|
-
echo "NOTE autocomplete: run eggs autocomplete and follow instrutions"
|
|
27
|
-
echo " man pages are not available in penguins-eggs as AppImage."
|
|
28
|
-
echo ""
|
|
29
|
-
|
|
30
|
-
echo ""
|
|
31
|
-
echo "SUCCESS: Penguins Eggs installed system-wide!"
|
|
32
|
-
echo ""
|
|
33
|
-
echo "Components installed:"
|
|
34
|
-
echo " - Main executable: $INSTALL_DIR/eggs"
|
|
35
|
-
echo ""
|
|
36
|
-
echo "Usage:"
|
|
37
|
-
echo " eggs help [command] # Get help for specific commands"
|
|
38
|
-
echo " eggs setup -f # Install prerequisites"
|
|
39
|
-
echo " eggs dad -d # Configure eggs (default values)"
|
|
40
|
-
echo " eggs love -n # Create live ISO image (nointeractive)"
|
|
41
|
-
echo ""
|
|
42
|
-
echo "For full documentation, visit:"
|
|
43
|
-
echo " https://github.com/pieroproietti/penguins-eggs"
|