penguins-eggs 25.11.8 → 25.11.21
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 +149 -140
- package/README.md +90 -132
- package/README.pdf +1343 -2331
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
- package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
- package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
- package/addons/eggs/theme/applications/install-system.desktop +0 -0
- package/assets/calamares/install-system.sh +0 -0
- package/assets/penguins-eggs.desktop +0 -0
- package/assets/penguins-krill.desktop +0 -0
- package/assets/penguins-links-add.desktop +0 -0
- package/assets/penguins-live-installer.desktop +0 -0
- package/bin/dev.js +0 -0
- package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
- package/conf/distros/archlinux/calamares/modules/bootloader.yml +1 -1
- package/conf/distros/archlinux/calamares/modules/partition.yml +385 -8
- package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/focal/calamares/calamares-modules/.keepit +0 -0
- package/conf/distros/focal/calamares/calamares-modules/cleanup/cleanup.sh +20 -0
- package/conf/distros/focal/calamares/calamares-modules/cleanup/module.yml +9 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/module.yml +8 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/sources-yolk.sh +50 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk-undo/module.yml +8 -0
- package/conf/distros/focal/calamares/libexec/.keepit +0 -0
- package/conf/distros/focal/calamares/libexec/README.md +5 -0
- package/conf/distros/focal/calamares/libexec/calamares-aptsources.sh +15 -0
- package/conf/distros/focal/calamares/libexec/calamares-l10n-helper.sh +38 -0
- package/conf/distros/focal/calamares/libexec/calamares-logs-helper.sh +34 -0
- package/conf/distros/focal/calamares/libexec/calamares-nomodeset.sh +19 -0
- package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +26 -0
- package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +12 -0
- package/conf/distros/focal/calamares/modules/bootloader.yml +86 -0
- package/conf/distros/focal/calamares/modules/bootloader.yml.old +35 -0
- package/conf/distros/focal/calamares/modules/displaymanager.yml +12 -0
- package/conf/distros/focal/calamares/modules/finished.yml +6 -0
- package/conf/distros/focal/calamares/modules/fstab.yml +63 -0
- package/conf/distros/focal/calamares/modules/grubcfg.yml +51 -0
- package/conf/distros/focal/calamares/modules/keyboard.yml +29 -0
- package/conf/distros/focal/calamares/modules/locale.yml +7 -0
- package/conf/distros/focal/calamares/modules/machineid.yml +10 -0
- package/conf/distros/focal/calamares/modules/mount.yml +20 -0
- package/conf/distros/focal/calamares/modules/netinstall.yml +5 -0
- package/conf/distros/focal/calamares/modules/packages.mustache +5 -0
- package/conf/distros/focal/calamares/modules/partition.yml +21 -0
- package/conf/distros/focal/calamares/modules/removeuser.mustache +3 -0
- package/conf/distros/focal/calamares/modules/shellprocess@aptsources.yml +11 -0
- package/conf/distros/focal/calamares/modules/shellprocess@boot_deploy.yml +9 -0
- package/conf/distros/focal/calamares/modules/shellprocess@boot_reconfigure.yml +15 -0
- package/conf/distros/focal/calamares/modules/shellprocess@install_translations.yml +8 -0
- package/conf/distros/focal/calamares/modules/shellprocess@logs.yml +8 -0
- package/conf/distros/focal/calamares/modules/shellprocess@mkinitramfs.yml +6 -0
- package/conf/distros/focal/calamares/modules/shellprocess@nomodeset.yml +12 -0
- package/conf/distros/focal/calamares/modules/umount.yml +4 -0
- package/conf/distros/focal/calamares/modules/unpackfs.mustache +6 -0
- package/conf/distros/focal/calamares/modules/users.yml +27 -0
- package/conf/distros/focal/calamares/modules/welcome.yml +24 -0
- package/conf/distros/focal/calamares/settings.yml +97 -0
- package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/noble/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-aptsources.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-logs-helper.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-nomodeset.sh +0 -0
- package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/opensuse/calamares/settings.yml +0 -0
- package/conf/distros/opensuse/calamares/zstd2lzo.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/init/unattended.sh +0 -0
- package/dist/appimage/first-run-check.d.ts +8 -0
- package/dist/appimage/first-run-check.js +13 -0
- package/dist/appimage/prerequisites.d.ts +34 -0
- package/dist/appimage/prerequisites.js +350 -0
- package/dist/bin/dev.cmd +3 -0
- package/dist/bin/dev.js +6 -0
- package/dist/bin/run.cmd +3 -0
- package/dist/bin/run.js +5 -0
- package/dist/classes/cli-autologin.js +4 -4
- package/dist/classes/distro.js +11 -27
- package/dist/classes/diversions.d.ts +5 -0
- package/dist/classes/diversions.js +23 -7
- package/dist/classes/incubation/customize/customize-partitions.js +8 -1
- package/dist/classes/incubation/fisherman-helper/packages.js +1 -1
- package/dist/classes/incubation/incubator.js +2 -2
- package/dist/classes/pacman.d/archlinux.js +5 -5
- package/dist/classes/pacman.d/debian.js +0 -2
- package/dist/classes/pacman.d/opensuse.js +2 -2
- package/dist/classes/pacman.js +10 -11
- package/dist/classes/utils.d.ts +4 -0
- package/dist/classes/utils.js +19 -3
- package/dist/commands/calamares.js +1 -1
- package/dist/commands/config.js +2 -2
- package/dist/commands/{analyze.d.ts → export/appimage.d.ts} +10 -9
- package/dist/commands/export/appimage.js +76 -0
- package/dist/commands/export/iso.js +1 -1
- package/dist/commands/export/pkg.d.ts +1 -1
- package/dist/commands/export/pkg.js +2 -2
- package/dist/commands/{install.d.ts → krill.d.ts} +3 -4
- package/dist/commands/{install.js → krill.js} +5 -6
- package/dist/commands/produce.js +1 -1
- package/dist/commands/setup.d.ts +21 -0
- package/dist/commands/setup.js +90 -0
- package/dist/commands/tools/repo.d.ts +0 -5
- package/dist/commands/tools/repo.js +205 -127
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.js +68 -59
- package/dist/krill/components/information.js +2 -2
- package/dist/krill/components/title.js +13 -13
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.js +24 -32
- package/dracut/create-symlink +0 -0
- package/dracut/export +0 -0
- package/dracut/export-dracut-analysis +0 -0
- package/dracut/export-dracut-log +0 -0
- package/dracut/mkisofs +0 -0
- package/dracut/modules.d/00debug-shell/debug-hook.sh +0 -0
- package/dracut/modules.d/00debug-shell/module-setup.sh +0 -0
- package/dracut/modules.d/90block/block-cmdline.sh +0 -0
- package/dracut/modules.d/90block/module-setup.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan-fallback.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan.sh +0 -0
- package/dracut/modules.d/95iso-scan/module-setup.sh +0 -0
- package/dracut/modules.d/95luks-loop/luks-loop.sh +0 -0
- package/dracut/modules.d/95luks-loop/module-setup.sh +0 -0
- package/dracut/renew-initramfs +0 -0
- package/dracut/sbin2bin +0 -0
- package/dracut/update-dracut-conf-d +0 -0
- package/dracut/update-dracut-modules +0 -0
- package/eui/eui-autostart-cinnamon.desktop +0 -0
- package/eui/eui-autostart-xfce.desktop +0 -0
- package/eui/eui-create-image.sh +0 -0
- package/eui/eui-start.sh +0 -0
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +582 -9
- package/package.json +125 -130
- package/perrisbrewery/scripts/postinst +0 -0
- package/perrisbrewery/scripts/postrm +0 -0
- package/perrisbrewery/scripts/preinst +0 -0
- package/perrisbrewery/scripts/prerm +0 -0
- package/perrisbrewery/template/dependencies.yaml +0 -5
- package/perrisbrewery/template/man.template.md +7 -0
- package/scripts/99clean +0 -0
- package/scripts/_eggs +28 -47
- package/scripts/adapt.sh +0 -0
- package/scripts/appimage-build.sh +152 -0
- package/scripts/appimage-install.sh +43 -0
- package/scripts/bros/waydroid-helper.sh +0 -0
- package/scripts/eggs.bash +3 -4
- package/scripts/lsb_release +0 -0
- package/scripts/mom.sh +0 -0
- package/scripts/pve-live.service +0 -0
- package/scripts/pve-live.sh +0 -0
- package/scripts/resy +0 -0
- package/dist/classes/distro-hossein.d.ts +0 -52
- package/dist/classes/distro-hossein.js +0 -239
- package/dist/classes/incubation/incubator.d/bionic.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/bionic.js +0 -83
- package/dist/commands/analyze.js +0 -95
- package/dist/commands/pods.d.ts +0 -22
- package/dist/commands/pods.js +0 -92
- package/scripts/boot-encrypted-root.sh +0 -220
- package/scripts/mount-encrypted-home.sh +0 -324
package/scripts/eggs.bash
CHANGED
|
@@ -12,21 +12,20 @@ _eggs_autocomplete()
|
|
|
12
12
|
|
|
13
13
|
local commands="
|
|
14
14
|
adapt --help --verbose
|
|
15
|
-
analyze --help --verbose
|
|
16
15
|
calamares --help --install --nointeractive --policies --release --remove --theme --verbose
|
|
17
16
|
config --clean --help --nointeractive --verbose
|
|
18
17
|
cuckoo --help --verbose
|
|
19
18
|
dad --clean --default --file --nointeractive --help --verbose
|
|
19
|
+
export:appimage --clean --help --verbose
|
|
20
20
|
export:iso --checksum --clean --help --verbose
|
|
21
21
|
export:pkg --all --clean --help --verbose
|
|
22
22
|
export:tarballs --clean --help --verbose
|
|
23
|
-
install --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive --none --pve --random --replace --small --suspend --testing --unattended --verbose
|
|
24
|
-
krill --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive --none --pve --random --replace --small --suspend --testing --unattended --verbose
|
|
25
23
|
kill --help --isos --nointeractive --verbose
|
|
24
|
+
krill --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive --none --pve --random --replace --small --suspend --testing --unattended --verbose
|
|
26
25
|
love --help --verbose --hidden --nointeractive --clone --homecrypt --fullcrypt
|
|
27
26
|
mom --help
|
|
28
|
-
pods --help
|
|
29
27
|
produce --addons --basename --clone --homecrypt --fullcrypt --excludes --help --hidden --kernel --links --max --noicon --nointeractive --pendrive --prefix --release --script --standard --theme --includeRootHome --verbose --yolk
|
|
28
|
+
setup --check --force
|
|
30
29
|
status --help --verbose
|
|
31
30
|
tools:clean --help --nointeractive --verbose
|
|
32
31
|
tools:repo --add --help --nointeractive --remove --verbose
|
package/scripts/lsb_release
CHANGED
|
File without changes
|
package/scripts/mom.sh
CHANGED
|
File without changes
|
package/scripts/pve-live.service
CHANGED
|
File without changes
|
package/scripts/pve-live.sh
CHANGED
|
File without changes
|
package/scripts/resy
CHANGED
|
File without changes
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* penguins-eggs
|
|
3
|
-
* class: distro.ts
|
|
4
|
-
* author: Piero Proietti (modified by Hossein Seilani)
|
|
5
|
-
* license: MIT
|
|
6
|
-
*
|
|
7
|
-
* FINAL VERSION WITH EXPLAINED COMMENTS AND NEW CHANGE TAGS
|
|
8
|
-
*/
|
|
9
|
-
import { IDistro } from '../interfaces/index.js';
|
|
10
|
-
declare class Distro implements IDistro {
|
|
11
|
-
bugReportUrl: string;
|
|
12
|
-
codenameId: string;
|
|
13
|
-
distroUniqueId: string;
|
|
14
|
-
distroId: string;
|
|
15
|
-
distroLike: string;
|
|
16
|
-
familyId: string;
|
|
17
|
-
homeUrl: string;
|
|
18
|
-
isCalamaresAvailable: boolean;
|
|
19
|
-
liveMediumPath: string;
|
|
20
|
-
releaseId: string;
|
|
21
|
-
squashfs: string;
|
|
22
|
-
supportUrl: string;
|
|
23
|
-
syslinuxPath: string;
|
|
24
|
-
usrLibPath: string;
|
|
25
|
-
constructor();
|
|
26
|
-
/**
|
|
27
|
-
* NEW CHANGE6: Modular configuration for main distro types like Alpine, Fedora-family, etc.
|
|
28
|
-
* This simplifies the constructor and keeps distro-specific logic isolated.
|
|
29
|
-
*/
|
|
30
|
-
private configureDistro;
|
|
31
|
-
/**
|
|
32
|
-
* NEW CHANGE12: Map Debian, Ubuntu, Devuan codenames to proper IDs and paths
|
|
33
|
-
* This avoids long if/else chains and allows easier future updates.
|
|
34
|
-
*/
|
|
35
|
-
private debianFamily;
|
|
36
|
-
/**
|
|
37
|
-
* NEW CHANGE15: Async derivative detection from YAML files
|
|
38
|
-
* This allows future-proofing and easy updates for new distros.
|
|
39
|
-
*/
|
|
40
|
-
private detectDerivatives;
|
|
41
|
-
/**
|
|
42
|
-
* NEW CHANGE16: Apply family-specific paths for usrLibPath, squashfs, and liveMediumPath
|
|
43
|
-
* Handles Debian, openSUSE, Manjaro and derivatives consistently.
|
|
44
|
-
*/
|
|
45
|
-
private applyFamilySpecificPaths;
|
|
46
|
-
/**
|
|
47
|
-
* NEW CHANGE17: Load custom HOME, SUPPORT, BUG_REPORT URLs from /etc/os-release
|
|
48
|
-
* Allows overrides of default URLs for user-friendly experience.
|
|
49
|
-
*/
|
|
50
|
-
private loadOSReleaseUrls;
|
|
51
|
-
}
|
|
52
|
-
export default Distro;
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* penguins-eggs
|
|
3
|
-
* class: distro.ts
|
|
4
|
-
* author: Piero Proietti (modified by Hossein Seilani)
|
|
5
|
-
* license: MIT
|
|
6
|
-
*
|
|
7
|
-
* FINAL VERSION WITH EXPLAINED COMMENTS AND NEW CHANGE TAGS
|
|
8
|
-
*/
|
|
9
|
-
import yaml from 'js-yaml';
|
|
10
|
-
import fs from 'node:fs/promises';
|
|
11
|
-
import fsSync from 'node:fs';
|
|
12
|
-
import path from 'node:path';
|
|
13
|
-
import shell from 'shelljs';
|
|
14
|
-
import Utils from './utils.js';
|
|
15
|
-
import Diversions from './diversions.js';
|
|
16
|
-
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
17
|
-
class Distro {
|
|
18
|
-
// NEW CHANGE 1: Added default values for all main distro properties to ensure proper initialization.
|
|
19
|
-
// This prevents undefined values in later logic and standardizes URLs and paths.
|
|
20
|
-
bugReportUrl = 'https://github.com-pieroproietti/penguins-eggs/issue';
|
|
21
|
-
codenameId = '';
|
|
22
|
-
distroUniqueId = '';
|
|
23
|
-
distroId = '';
|
|
24
|
-
distroLike = '';
|
|
25
|
-
familyId = 'debian';
|
|
26
|
-
homeUrl = 'https://penguins-eggs.net';
|
|
27
|
-
isCalamaresAvailable = true;
|
|
28
|
-
liveMediumPath = '/run/live/medium/';
|
|
29
|
-
releaseId = '';
|
|
30
|
-
squashfs = 'live/filesystem.squashfs';
|
|
31
|
-
supportUrl = 'https://penguins-eggs.net';
|
|
32
|
-
syslinuxPath = path.resolve(__dirname, `../../syslinux`);
|
|
33
|
-
usrLibPath = '/usr/lib';
|
|
34
|
-
constructor() {
|
|
35
|
-
// NEW CHANGE2: Initialize OS info using Utils.getOsRelease()
|
|
36
|
-
// This ensures the distroId, codenameId, and releaseId are set early for proper logic.
|
|
37
|
-
const osInfo = Utils.getOsRelease();
|
|
38
|
-
this.distroId = osInfo.ID;
|
|
39
|
-
this.codenameId = osInfo.VERSION_CODENAME;
|
|
40
|
-
this.releaseId = osInfo.VERSION_ID;
|
|
41
|
-
// NEW CHANGE3: Normalize special distro names to handle edge cases like Debian sid
|
|
42
|
-
// or custom Biglinux/Bigcommunity derivatives to maintain consistency.
|
|
43
|
-
if (this.distroId === 'Debian' && this.codenameId === 'sid')
|
|
44
|
-
this.codenameId = 'trixie';
|
|
45
|
-
if (this.distroId.includes('Biglinux'))
|
|
46
|
-
this.distroId = 'Biglinux';
|
|
47
|
-
if (this.distroId.includes('Bigcommunity'))
|
|
48
|
-
this.distroId = 'Bigcommunity';
|
|
49
|
-
// NEW CHANGE4: Modularize distro configuration for better readability and maintenance
|
|
50
|
-
this.configureDistro();
|
|
51
|
-
this.applyFamilySpecificPaths();
|
|
52
|
-
// NEW CHANGE5: Load URLs from /etc/os-release to override defaults if available
|
|
53
|
-
this.loadOSReleaseUrls();
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* NEW CHANGE6: Modular configuration for main distro types like Alpine, Fedora-family, etc.
|
|
57
|
-
* This simplifies the constructor and keeps distro-specific logic isolated.
|
|
58
|
-
*/
|
|
59
|
-
configureDistro() {
|
|
60
|
-
// NEW CHANGE7: Handle Alpine specific paths and properties
|
|
61
|
-
if (this.distroId === 'Alpine') {
|
|
62
|
-
this.familyId = 'alpine';
|
|
63
|
-
this.distroLike = 'Alpine';
|
|
64
|
-
this.codenameId = 'rolling';
|
|
65
|
-
this.distroUniqueId = this.familyId;
|
|
66
|
-
this.liveMediumPath = '/mnt/';
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Arch
|
|
71
|
-
*/
|
|
72
|
-
if (this.codenameId === 'rolling' || this.codenameId === 'n/a') {
|
|
73
|
-
this.familyId = 'archlinux';
|
|
74
|
-
this.distroLike = 'Arch';
|
|
75
|
-
this.codenameId = 'rolling';
|
|
76
|
-
this.distroUniqueId = 'archlinux';
|
|
77
|
-
this.liveMediumPath = '/run/archiso/bootmnt/';
|
|
78
|
-
this.squashfs = `arch/x86_64/airootfs.sfs`;
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
// NEW CHANGE8: Consolidated Fedora-family detection for multiple derivatives
|
|
82
|
-
const fedoraDistros = ['Almalinux', 'Fedora', 'Nobara', 'Rhel', 'Rocky'];
|
|
83
|
-
if (fedoraDistros.includes(this.distroId)) {
|
|
84
|
-
this.familyId = 'fedora';
|
|
85
|
-
this.distroLike = 'Fedora';
|
|
86
|
-
this.codenameId = 'rolling';
|
|
87
|
-
this.distroUniqueId = this.familyId;
|
|
88
|
-
this.liveMediumPath = '/run/initramfs/live/';
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
// NEW CHANGE9: Openmamba specific properties
|
|
92
|
-
if (this.distroId === 'Openmamba') {
|
|
93
|
-
this.familyId = 'openmamba';
|
|
94
|
-
this.distroLike = 'Openmamba';
|
|
95
|
-
this.codenameId = 'rolling';
|
|
96
|
-
this.distroUniqueId = this.familyId;
|
|
97
|
-
this.liveMediumPath = '/run/initramfs/live/';
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
// NEW CHANGE10: OpenSUSE specific properties
|
|
101
|
-
if (this.distroId.includes('Opensuse')) {
|
|
102
|
-
this.familyId = 'opensuse';
|
|
103
|
-
this.distroLike = 'Opensuse';
|
|
104
|
-
this.codenameId = 'rolling';
|
|
105
|
-
this.distroUniqueId = this.familyId;
|
|
106
|
-
this.liveMediumPath = '/run/initramfs/live/';
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
// NEW CHANGE11: Handle Debian/Ubuntu/Devuan and their derivatives
|
|
110
|
-
this.debianFamily();
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* NEW CHANGE12: Map Debian, Ubuntu, Devuan codenames to proper IDs and paths
|
|
114
|
-
* This avoids long if/else chains and allows easier future updates.
|
|
115
|
-
*/
|
|
116
|
-
debianFamily() {
|
|
117
|
-
const mapping = {
|
|
118
|
-
jessie: { distroLike: 'Debian', uniqueId: 'jessie', livePath: '/lib/live/mount/medium/', calamares: false },
|
|
119
|
-
stretch: { distroLike: 'Debian', uniqueId: 'stretch', livePath: '/lib/live/mount/medium/', calamares: false },
|
|
120
|
-
buster: { distroLike: 'Debian', uniqueId: 'buster' },
|
|
121
|
-
bullseye: { distroLike: 'Debian', uniqueId: 'bullseye' },
|
|
122
|
-
bookworm: { distroLike: 'Debian', uniqueId: 'bookworm' },
|
|
123
|
-
trixie: { distroLike: 'Debian', uniqueId: 'trixie' },
|
|
124
|
-
forky: { distroLike: 'Debian', uniqueId: 'forky' },
|
|
125
|
-
beowulf: { distroLike: 'Devuan', uniqueId: 'beowulf' },
|
|
126
|
-
chimaera: { distroLike: 'Devuan', uniqueId: 'chimaera' },
|
|
127
|
-
daedalus: { distroLike: 'Devuan', uniqueId: 'daedalus' },
|
|
128
|
-
excalibur: { distroLike: 'Devuan', uniqueId: 'excalibur' },
|
|
129
|
-
bionic: { distroLike: 'Ubuntu', uniqueId: 'bionic', livePath: '/lib/live/mount/medium/' },
|
|
130
|
-
focal: { distroLike: 'Ubuntu', uniqueId: 'focal' },
|
|
131
|
-
jammy: { distroLike: 'Ubuntu', uniqueId: 'jammy' },
|
|
132
|
-
noble: { distroLike: 'Ubuntu', uniqueId: 'noble' },
|
|
133
|
-
devel: { distroLike: 'Ubuntu', uniqueId: 'devel' },
|
|
134
|
-
};
|
|
135
|
-
// NEW CHANGE13: Apply mapping if codename exists
|
|
136
|
-
const cfg = mapping[this.codenameId];
|
|
137
|
-
if (cfg) {
|
|
138
|
-
this.familyId = "debian";
|
|
139
|
-
this.distroLike = cfg.distroLike;
|
|
140
|
-
this.distroUniqueId = cfg.uniqueId;
|
|
141
|
-
if (cfg.livePath !== undefined)
|
|
142
|
-
this.liveMediumPath = cfg.livePath;
|
|
143
|
-
if (cfg.calamares !== undefined)
|
|
144
|
-
this.isCalamaresAvailable = cfg.calamares;
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
// NEW CHANGE14: Detect derivatives if not in mapping
|
|
148
|
-
this.detectDerivatives();
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* NEW CHANGE15: Async derivative detection from YAML files
|
|
152
|
-
* This allows future-proofing and easy updates for new distros.
|
|
153
|
-
*/
|
|
154
|
-
async detectDerivatives() {
|
|
155
|
-
let archDebianDerivatives = path.resolve(__dirname, '../../conf/derivatives.yaml');
|
|
156
|
-
if (fsSync.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
|
|
157
|
-
archDebianDerivatives = '/etc/penguins-eggs.d/derivatives.yaml';
|
|
158
|
-
}
|
|
159
|
-
let found = false;
|
|
160
|
-
if (fsSync.existsSync(archDebianDerivatives)) {
|
|
161
|
-
const content = await fs.readFile(archDebianDerivatives, 'utf8');
|
|
162
|
-
const distros = yaml.load(content);
|
|
163
|
-
for (const distro of distros) {
|
|
164
|
-
if (distro.ids !== undefined) {
|
|
165
|
-
for (let n = 0; n < distro.ids.length; n++) {
|
|
166
|
-
if (this.codenameId === distro.ids[n]) {
|
|
167
|
-
found = true;
|
|
168
|
-
this.distroLike = distro.distroLike;
|
|
169
|
-
this.distroUniqueId = distro.id;
|
|
170
|
-
this.familyId = distro.family;
|
|
171
|
-
found = true;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
if (!found) {
|
|
178
|
-
let fedoraDerivatives = path.resolve(__dirname, '../../conf/derivatives_fedora.yaml');
|
|
179
|
-
if (fsSync.existsSync('/etc/penguins-eggs.d/derivatives_fedora.yaml')) {
|
|
180
|
-
fedoraDerivatives = '/etc/penguins-eggs.d/derivatives_fedora.yaml';
|
|
181
|
-
}
|
|
182
|
-
const content = fsSync.readFileSync(fedoraDerivatives, 'utf8');
|
|
183
|
-
const elem = yaml.load(content);
|
|
184
|
-
if (elem.includes(this.distroId)) {
|
|
185
|
-
this.familyId = 'fedora';
|
|
186
|
-
this.distroLike = 'Fedora';
|
|
187
|
-
this.codenameId = 'rolling';
|
|
188
|
-
this.distroUniqueId = this.familyId;
|
|
189
|
-
this.liveMediumPath = '/run/initramfs/live/';
|
|
190
|
-
found = true;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (!found) {
|
|
194
|
-
console.warn(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
|
|
195
|
-
console.warn('Edit derivatives.yaml and run: sudo eggs dad -d to re-configure.');
|
|
196
|
-
process.exit(0);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* NEW CHANGE16: Apply family-specific paths for usrLibPath, squashfs, and liveMediumPath
|
|
201
|
-
* Handles Debian, openSUSE, Manjaro and derivatives consistently.
|
|
202
|
-
*/
|
|
203
|
-
applyFamilySpecificPaths() {
|
|
204
|
-
if (this.familyId === 'archlinux') {
|
|
205
|
-
if (Diversions.isManjaroBased(this.distroId)) {
|
|
206
|
-
this.liveMediumPath = '/run/miso/bootmnt/';
|
|
207
|
-
this.squashfs = 'manjaro/x86_64/livefs.sfs';
|
|
208
|
-
this.codenameId = shell.exec('lsb_release -cs', { silent: true }).stdout.toString().trim();
|
|
209
|
-
this.distroUniqueId = 'manjaro';
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
else if (this.familyId === 'debian') {
|
|
213
|
-
this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
|
|
214
|
-
}
|
|
215
|
-
else if (this.familyId === 'opensuse') {
|
|
216
|
-
this.usrLibPath = '/usr/lib64/';
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* NEW CHANGE17: Load custom HOME, SUPPORT, BUG_REPORT URLs from /etc/os-release
|
|
221
|
-
* Allows overrides of default URLs for user-friendly experience.
|
|
222
|
-
*/
|
|
223
|
-
loadOSReleaseUrls() {
|
|
224
|
-
const os_release = '/etc/os-release';
|
|
225
|
-
if (!fsSync.existsSync(os_release))
|
|
226
|
-
return;
|
|
227
|
-
const data = fsSync.readFileSync(os_release, 'utf8');
|
|
228
|
-
const lines = data.split('\n');
|
|
229
|
-
for (const line of lines) {
|
|
230
|
-
if (line.startsWith('HOME_URL='))
|
|
231
|
-
this.homeUrl = line.slice('HOME_URL='.length).replace(/"/g, '');
|
|
232
|
-
if (line.startsWith('SUPPORT_URL='))
|
|
233
|
-
this.supportUrl = line.slice('SUPPORT_URL='.length).replace(/"/g, '');
|
|
234
|
-
if (line.startsWith('BUG_REPORT_URL='))
|
|
235
|
-
this.bugReportUrl = line.slice('BUG_REPORT_URL='.length).replace(/"/g, '');
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
export default Distro;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/classes/incubation/distros/bionic.ts
|
|
3
|
-
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import { IDistro, IInstaller, IRemix } from '../../../interfaces/index.js';
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
export declare class Bionic {
|
|
13
|
-
distro: IDistro;
|
|
14
|
-
installer: IInstaller;
|
|
15
|
-
isClone: boolean;
|
|
16
|
-
release: boolean;
|
|
17
|
-
remix: IRemix;
|
|
18
|
-
theme: string;
|
|
19
|
-
user_opt: string;
|
|
20
|
-
verbose: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* @param remix
|
|
23
|
-
* @param distro
|
|
24
|
-
* @param release
|
|
25
|
-
* @param verbose
|
|
26
|
-
*/
|
|
27
|
-
constructor(installer: IInstaller, remix: IRemix, distro: IDistro, user_opt: string, release?: boolean, theme?: string, isClone?: boolean, verbose?: boolean);
|
|
28
|
-
/**
|
|
29
|
-
* locale, partitions, users can come from themes
|
|
30
|
-
*/
|
|
31
|
-
create(): Promise<void>;
|
|
32
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/classes/incubation/distros/bionic.ts
|
|
3
|
-
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import CFS from '../../../krill/classes/cfs.js';
|
|
9
|
-
import Fisherman from '../fisherman.js';
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export class Bionic {
|
|
14
|
-
distro;
|
|
15
|
-
installer = {};
|
|
16
|
-
isClone;
|
|
17
|
-
release = false;
|
|
18
|
-
remix;
|
|
19
|
-
theme; // theme comprende il path
|
|
20
|
-
user_opt;
|
|
21
|
-
verbose = false;
|
|
22
|
-
/**
|
|
23
|
-
* @param remix
|
|
24
|
-
* @param distro
|
|
25
|
-
* @param release
|
|
26
|
-
* @param verbose
|
|
27
|
-
*/
|
|
28
|
-
constructor(installer, remix, distro, user_opt, release = false, theme = 'eggs', isClone = false, verbose = false) {
|
|
29
|
-
this.installer = installer;
|
|
30
|
-
this.remix = remix;
|
|
31
|
-
this.distro = distro;
|
|
32
|
-
this.user_opt = user_opt;
|
|
33
|
-
this.verbose = verbose;
|
|
34
|
-
this.release = release;
|
|
35
|
-
this.theme = theme;
|
|
36
|
-
this.isClone = isClone;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* locale, partitions, users can come from themes
|
|
40
|
-
*/
|
|
41
|
-
async create() {
|
|
42
|
-
const fisherman = new Fisherman(this.distro, this.installer, this.verbose);
|
|
43
|
-
await fisherman.createCalamaresSettings(this.theme, this.isClone);
|
|
44
|
-
await fisherman.buildModule('welcome');
|
|
45
|
-
await fisherman.buildModule('partition', this.remix.branding);
|
|
46
|
-
await fisherman.buildModule('mount');
|
|
47
|
-
await fisherman.buildModuleUnpackfs(); //
|
|
48
|
-
await fisherman.buildModule('machineid');
|
|
49
|
-
await fisherman.buildModule('fstab');
|
|
50
|
-
await fisherman.buildModule('locale', this.remix.branding);
|
|
51
|
-
await fisherman.buildModule('keyboard');
|
|
52
|
-
await fisherman.buildModule('localecfg');
|
|
53
|
-
await fisherman.buildModule('luksbootkeyfile');
|
|
54
|
-
await fisherman.buildModule('users', this.remix.branding);
|
|
55
|
-
await fisherman.buildModule('displaymanager');
|
|
56
|
-
await fisherman.buildModule('networkcfg');
|
|
57
|
-
await fisherman.buildModule('hwclock');
|
|
58
|
-
await fisherman.buildCalamaresModule('sources-yolk', true);
|
|
59
|
-
await fisherman.buildCalamaresModule('bug');
|
|
60
|
-
await fisherman.buildModule('initramfscfg');
|
|
61
|
-
await fisherman.buildModule('initramfs');
|
|
62
|
-
await fisherman.buildCalamaresPy('grubcfg');
|
|
63
|
-
await fisherman.buildModule('bootloader');
|
|
64
|
-
await fisherman.buildCalamaresModule('after-bootloader');
|
|
65
|
-
await fisherman.buildCalamaresModule('add386arch', false);
|
|
66
|
-
await fisherman.buildModulePackages(this.distro, this.release); //
|
|
67
|
-
await fisherman.buildModuleRemoveuser(this.user_opt); //
|
|
68
|
-
await fisherman.buildCalamaresModule('sources-yolk-undo', false);
|
|
69
|
-
await fisherman.buildCalamaresModule('cleanup', true);
|
|
70
|
-
/**
|
|
71
|
-
* cfs: custom final steps
|
|
72
|
-
*/
|
|
73
|
-
const cfs = new CFS();
|
|
74
|
-
const steps = await cfs.steps();
|
|
75
|
-
if (steps.length > 0) {
|
|
76
|
-
for (const step of steps) {
|
|
77
|
-
await fisherman.buildCalamaresModule(step, true, this.theme);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
await fisherman.buildModule('umount');
|
|
81
|
-
await fisherman.buildModule('finished');
|
|
82
|
-
}
|
|
83
|
-
}
|
package/dist/commands/analyze.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/commands/analyze.ts
|
|
3
|
-
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import { Command, Flags } from '@oclif/core';
|
|
9
|
-
import fs, { constants } from 'node:fs';
|
|
10
|
-
import { access } from 'node:fs/promises';
|
|
11
|
-
import si from 'systeminformation';
|
|
12
|
-
import Users from '../classes/users.js';
|
|
13
|
-
import Utils from '../classes/utils.js';
|
|
14
|
-
export default class Analyze extends Command {
|
|
15
|
-
static description = 'analyze for syncto';
|
|
16
|
-
static examples = ['sudo eggs analyze'];
|
|
17
|
-
static flags = {
|
|
18
|
-
help: Flags.help({ char: 'h' }),
|
|
19
|
-
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
20
|
-
};
|
|
21
|
-
config_file = '/etc/penguins-eggs.d/eggs.yaml';
|
|
22
|
-
snapshot_dir = '';
|
|
23
|
-
work_dir = {};
|
|
24
|
-
/**
|
|
25
|
-
* fill
|
|
26
|
-
*/
|
|
27
|
-
async fill() {
|
|
28
|
-
try {
|
|
29
|
-
const usersArray = [];
|
|
30
|
-
await access('/etc/passwd', constants.R_OK | constants.W_OK);
|
|
31
|
-
const passwd = fs.readFileSync('/etc/passwd', 'utf8').split('\n');
|
|
32
|
-
for (const element of passwd) {
|
|
33
|
-
const line = element.split(':');
|
|
34
|
-
const users = new Users(line[0], line[1], line[2], line[3], line[4], line[5], line[6]);
|
|
35
|
-
await users.getValues();
|
|
36
|
-
if (users.password !== undefined) {
|
|
37
|
-
usersArray.push(users);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return usersArray;
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
console.error("can't read /etc/passwd");
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async run() {
|
|
48
|
-
Utils.titles(this.id + ' ' + this.argv);
|
|
49
|
-
const { flags } = await this.parse(Analyze);
|
|
50
|
-
let verbose = false;
|
|
51
|
-
if (flags.verbose) {
|
|
52
|
-
verbose = true;
|
|
53
|
-
}
|
|
54
|
-
Utils.warning('eggs will analyze your system, and get users data');
|
|
55
|
-
const echo = Utils.setEcho(verbose);
|
|
56
|
-
let totalSize = 0;
|
|
57
|
-
if (Utils.isRoot(this.id)) {
|
|
58
|
-
const audio = await si.audio();
|
|
59
|
-
const bios = await si.bios();
|
|
60
|
-
const blockDevices = await si.blockDevices();
|
|
61
|
-
const chassis = await si.chassis();
|
|
62
|
-
const cpu = await si.cpu();
|
|
63
|
-
const diskLayout = await si.diskLayout();
|
|
64
|
-
const mem = await si.mem();
|
|
65
|
-
const usb = await si.usb();
|
|
66
|
-
console.log(`chassis: ${chassis.manufacturer} model: ${chassis.manufacturer}`);
|
|
67
|
-
console.log(`bios vendor: ${bios.vendor} version: ${bios.version} revision: ${bios.revision}`);
|
|
68
|
-
console.log(`processor: ${cpu.brand} core: ${cpu.cores} `);
|
|
69
|
-
if (diskLayout[0].device !== undefined) {
|
|
70
|
-
console.log(`disk0: ${diskLayout[0].device}`);
|
|
71
|
-
}
|
|
72
|
-
if (diskLayout[1] !== undefined) {
|
|
73
|
-
console.log(`disk1: ${diskLayout[1].device}`);
|
|
74
|
-
}
|
|
75
|
-
if (diskLayout[2] !== undefined) {
|
|
76
|
-
console.log(`disk1: ${diskLayout[2].device}`);
|
|
77
|
-
}
|
|
78
|
-
// console.log(`name: ${blockDevices[0].name} fs: ${blockDevices[0].fsType}`)
|
|
79
|
-
// console.log(`name: ${blockDevices[1].name} fs: ${blockDevices[1].fsType}`)
|
|
80
|
-
// console.log(`name: ${blockDevices[2].name} fs: ${blockDevices[2].fsType}`)
|
|
81
|
-
// console.log(`name: ${blockDevices[3].name} fs: ${blockDevices[3].fsType}`)
|
|
82
|
-
// console.log(`usb: ${usb[0].name}`)
|
|
83
|
-
const users = await this.fill();
|
|
84
|
-
for (let i = 0; i < users.length; i++)
|
|
85
|
-
if (users[i].saveIt) {
|
|
86
|
-
console.log(`user: ${users[i].login} \thome: ${users[i].home.padEnd(16)} \tsize: ${Utils.formatBytes(users[i].size)} \tBytes: ${users[i].size} `);
|
|
87
|
-
totalSize += users[i].size;
|
|
88
|
-
}
|
|
89
|
-
console.log(`Total\t\t\t\t\tSize: ${Utils.formatBytes(totalSize)} \tBytes: ${totalSize}`);
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
Utils.useRoot(this.id);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
package/dist/commands/pods.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/commands/cuckoo.ts
|
|
3
|
-
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import { Command } from '@oclif/core';
|
|
9
|
-
export default class Pods extends Command {
|
|
10
|
-
static args: {
|
|
11
|
-
distro: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
12
|
-
};
|
|
13
|
-
static description: string;
|
|
14
|
-
static examples: string[];
|
|
15
|
-
static flags: {
|
|
16
|
-
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
run(): Promise<void>;
|
|
22
|
-
}
|
package/dist/commands/pods.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./src/commands/cuckoo.ts
|
|
3
|
-
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* email: piero.proietti@gmail.com
|
|
6
|
-
* license: MIT
|
|
7
|
-
*/
|
|
8
|
-
import { Args, Command, Flags } from '@oclif/core';
|
|
9
|
-
import fs from 'fs';
|
|
10
|
-
import Utils from '../classes/utils.js';
|
|
11
|
-
import { exec } from '../lib/utils.js';
|
|
12
|
-
import path from 'node:path';
|
|
13
|
-
import { execSync } from 'node:child_process';
|
|
14
|
-
// _dirname
|
|
15
|
-
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
16
|
-
export default class Pods extends Command {
|
|
17
|
-
static args = {
|
|
18
|
-
distro: Args.string({ description: 'distro to build', name: 'distro', required: false })
|
|
19
|
-
};
|
|
20
|
-
static description = 'eggs pods: build ISOs from containers';
|
|
21
|
-
static examples = [
|
|
22
|
-
'eggs pods archlinux',
|
|
23
|
-
'eggs pods debian',
|
|
24
|
-
'eggs pods ubuntu',
|
|
25
|
-
];
|
|
26
|
-
static flags = {
|
|
27
|
-
help: Flags.help({ char: 'h' })
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
async run() {
|
|
33
|
-
Utils.titles(this.id + ' ' + this.argv);
|
|
34
|
-
const { args, flags } = await this.parse(Pods);
|
|
35
|
-
if (!isPodmanInstalledSync()) {
|
|
36
|
-
console.log('You need to install podmand to use this command');
|
|
37
|
-
process.exit(0);
|
|
38
|
-
}
|
|
39
|
-
if (process.getuid && process.getuid() === 0) {
|
|
40
|
-
Utils.warning('You must use eggs pods without sudo');
|
|
41
|
-
process.exit(0);
|
|
42
|
-
}
|
|
43
|
-
// mode
|
|
44
|
-
let pathPods = path.resolve(__dirname, `../../pods`);
|
|
45
|
-
const userHome = `/home/${await Utils.getPrimaryUser()}/`;
|
|
46
|
-
if (Utils.isSources()) {
|
|
47
|
-
console.log("Using eggs pods from sources.\nThe pods directory of the source will be used ");
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
console.log("Using eggs pods from package.");
|
|
51
|
-
if (!fs.existsSync(`${userHome}/pods`)) {
|
|
52
|
-
console.log(`The pods directory will be created in the user home ${userHome}, do you want to continue?`);
|
|
53
|
-
if (await Utils.customConfirm()) {
|
|
54
|
-
console.log(`Creating a pods folder under ${userHome}`);
|
|
55
|
-
await exec(`cp -r ${Utils.rootPenguin()}/pods ${userHome}`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
pathPods = path.resolve(`${userHome}/pods`);
|
|
59
|
-
}
|
|
60
|
-
console.log(`Using ${pathPods}`);
|
|
61
|
-
let distro = 'debian';
|
|
62
|
-
if (this.argv['0'] !== undefined) {
|
|
63
|
-
distro = this.argv['0'];
|
|
64
|
-
}
|
|
65
|
-
let cmd = `${pathPods}/${distro}.sh`;
|
|
66
|
-
if (fs.existsSync(cmd)) {
|
|
67
|
-
console.log(`We are building a egg from a ${distro} container`);
|
|
68
|
-
if (!await Utils.customConfirm()) {
|
|
69
|
-
process.exit(0);
|
|
70
|
-
}
|
|
71
|
-
await exec(cmd);
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
console.log(`No script: ${cmd} fpr ${distro} container`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
80
|
-
* @returns
|
|
81
|
-
*/
|
|
82
|
-
function isPodmanInstalledSync() {
|
|
83
|
-
let podmanInstalled = false;
|
|
84
|
-
try {
|
|
85
|
-
execSync('podman --version', { stdio: 'ignore' });
|
|
86
|
-
podmanInstalled = true;
|
|
87
|
-
}
|
|
88
|
-
catch (error) {
|
|
89
|
-
console.error('Podman does not appear to be installed or is not in the PATH.\n');
|
|
90
|
-
}
|
|
91
|
-
return podmanInstalled;
|
|
92
|
-
}
|