penguins-eggs 9.0.35 → 9.1.11
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/README.md +136 -71
- package/assets/leaves.svg +1 -0
- package/assets/live-installer/com.github.pieroproietti.penguins-eggs.policy +25 -0
- package/assets/live-installer/filesystem.packages-remove +49 -0
- package/assets/penguins-live-installer.desktop +27 -0
- package/conf/distros/buster/calamares/modules/bootloader.yml +3 -1
- package/conf/eggs.yaml +9 -2
- package/lib/classes/bleach.js +2 -2
- package/lib/classes/compressors.js +1 -1
- package/lib/classes/daddy.js +28 -28
- package/lib/classes/distro.d.ts +1 -1
- package/lib/classes/distro.js +18 -4
- package/lib/classes/family/archlinux.js +4 -4
- package/lib/classes/family/debian.d.ts +4 -0
- package/lib/classes/family/debian.js +11 -4
- package/lib/classes/family/fedora.js +4 -4
- package/lib/classes/family/suse.js +4 -4
- package/lib/classes/i18n.d.ts +28 -4
- package/lib/classes/i18n.js +112 -84
- package/lib/classes/incubation/branding.js +13 -7
- package/lib/classes/incubation/distros/bionic.js +1 -1
- package/lib/classes/incubation/distros/buster.js +1 -1
- package/lib/classes/incubation/distros/focal.js +1 -1
- package/lib/classes/incubation/distros/jessie.js +1 -1
- package/lib/classes/incubation/distros/rolling.js +1 -1
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +1 -1
- package/lib/classes/incubation/fisherman-helper/packages.js +1 -1
- package/lib/classes/incubation/fisherman.js +5 -5
- package/lib/classes/incubation/incubator.js +4 -4
- package/lib/classes/incubation/installer.js +2 -2
- package/lib/classes/initrd.js +2 -2
- package/lib/classes/keyboards.d.ts +45 -0
- package/lib/classes/keyboards.js +196 -0
- package/lib/classes/krill_install.d.ts +4 -0
- package/lib/classes/krill_install.js +28 -10
- package/lib/classes/krill_prepare.d.ts +4 -0
- package/lib/classes/krill_prepare.js +56 -77
- package/lib/classes/locales.d.ts +14 -0
- package/lib/classes/locales.js +54 -0
- package/lib/classes/n8.js +1 -1
- package/lib/classes/ovary.d.ts +6 -0
- package/lib/classes/ovary.js +38 -24
- package/lib/classes/pacman.js +19 -19
- package/lib/classes/pve-live.js +3 -3
- package/lib/classes/settings.d.ts +6 -0
- package/lib/classes/settings.js +13 -16
- package/lib/classes/sources_list.d.ts +27 -0
- package/lib/classes/sources_list.js +103 -0
- package/lib/classes/systemctl.js +1 -1
- package/lib/classes/tailor.d.ts +41 -0
- package/lib/classes/tailor.js +356 -0
- package/lib/classes/tools.js +4 -4
- package/lib/classes/users.js +1 -1
- package/lib/classes/utils.d.ts +10 -0
- package/lib/classes/utils.js +39 -19
- package/lib/classes/xdg.d.ts +2 -1
- package/lib/classes/xdg.js +52 -111
- package/lib/classes/yolk.js +5 -5
- package/lib/commands/adapt.d.ts +0 -1
- package/lib/commands/adapt.js +2 -2
- package/lib/commands/analyze.js +6 -3
- package/lib/commands/calamares.js +4 -4
- package/lib/commands/config.d.ts +0 -1
- package/lib/commands/config.js +12 -7
- package/lib/commands/dad.js +5 -2
- package/lib/commands/export/deb.js +2 -2
- package/lib/commands/export/docs.js +2 -2
- package/lib/commands/export/iso.js +2 -2
- package/lib/commands/info.js +2 -2
- package/lib/commands/install.d.ts +0 -1
- package/lib/commands/install.js +11 -8
- package/lib/commands/kill.js +6 -3
- package/lib/commands/mom.js +2 -2
- package/lib/commands/produce.d.ts +0 -1
- package/lib/commands/produce.js +13 -10
- package/lib/commands/remove.js +5 -2
- package/lib/commands/syncfrom.d.ts +0 -1
- package/lib/commands/syncfrom.js +6 -3
- package/lib/commands/syncto.d.ts +0 -1
- package/lib/commands/syncto.js +7 -4
- package/lib/commands/tools/clean.d.ts +0 -1
- package/lib/commands/tools/clean.js +11 -6
- package/lib/commands/tools/locales.js +12 -4
- package/lib/commands/tools/skel.d.ts +0 -1
- package/lib/commands/tools/skel.js +6 -3
- package/lib/commands/tools/stat.d.ts +0 -1
- package/lib/commands/tools/stat.js +4 -4
- package/lib/commands/tools/yolk.js +7 -4
- package/lib/commands/update.d.ts +0 -2
- package/lib/commands/update.js +12 -58
- package/lib/commands/wardrobe/get.d.ts +17 -0
- package/lib/commands/wardrobe/get.js +43 -0
- package/lib/commands/wardrobe/ironing.d.ts +15 -0
- package/lib/commands/wardrobe/ironing.js +125 -0
- package/lib/commands/wardrobe/list.d.ts +17 -0
- package/lib/commands/wardrobe/list.js +81 -0
- package/lib/commands/wardrobe/show.d.ts +19 -0
- package/lib/commands/wardrobe/show.js +71 -0
- package/lib/commands/wardrobe/wear.d.ts +20 -0
- package/lib/commands/wardrobe/wear.js +79 -0
- package/lib/components/elements/information.js +29 -25
- package/lib/components/elements/steps.js +1 -1
- package/lib/components/elements/title.js +5 -4
- package/lib/components/finished.js +6 -5
- package/lib/components/install.js +5 -5
- package/lib/components/keyboard.js +5 -8
- package/lib/components/location.js +5 -5
- package/lib/components/network.js +6 -5
- package/lib/components/partitions.js +5 -5
- package/lib/components/summary.js +5 -5
- package/lib/components/users.js +5 -5
- package/lib/components/welcome.js +7 -7
- package/lib/interfaces/i-costume.d.ts +27 -0
- package/lib/interfaces/i-costume.js +2 -0
- package/lib/interfaces/i-krill.d.ts +1 -0
- package/lib/interfaces/i-materia.d.ts +32 -0
- package/lib/interfaces/i-materia.js +2 -0
- package/lib/interfaces/i-packages.d.ts +13 -0
- package/lib/interfaces/i-packages.js +2 -0
- package/lib/interfaces/i-xkb-model.d.ts +17 -0
- package/lib/interfaces/i-xkb-model.js +2 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/lib/cli-autologin.js +3 -3
- package/lib/lib/select_address_type.js +1 -1
- package/lib/lib/select_filesystem_type.js +2 -2
- package/lib/lib/select_installation_device.js +1 -1
- package/lib/lib/select_interface.js +1 -1
- package/lib/lib/select_keyboard_layout.d.ts +1 -28
- package/lib/lib/select_keyboard_layout.js +18 -33
- package/lib/lib/select_keyboard_model.d.ts +4 -0
- package/lib/lib/select_keyboard_model.js +36 -0
- package/lib/lib/select_keyboard_option.d.ts +4 -0
- package/lib/lib/select_keyboard_option.js +36 -0
- package/lib/lib/select_keyboard_variant.d.ts +1 -5
- package/lib/lib/select_keyboard_variant.js +32 -5
- package/lib/lib/select_languages.d.ts +1 -1
- package/lib/lib/select_languages.js +8 -7
- package/lib/lib/select_regions.d.ts +1 -1
- package/lib/lib/select_regions.js +2 -2
- package/lib/lib/select_user_swap_choice.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +19 -20
- package/scripts/_eggs +54 -16
- package/scripts/eggs.bash +9 -5
- package/scripts/mom-cli.sh +66 -0
- package/scripts/resy.sh +8 -0
- package/assets/penguins-clinstaller.desktop +0 -24
- package/assets/penguins-minstall.desktop +0 -95
- package/conf/distros/buster/locales/locale.gen.template +0 -10
- package/conf/distros/buster/locales/locale.template +0 -11
- package/conf/distros/focal/locale.gen.template +0 -8
- package/lib/classes/basket.d.ts +0 -22
- package/lib/classes/basket.js +0 -114
- package/lib/commands/bro.d.ts +0 -14
- package/lib/commands/bro.js +0 -31
package/lib/commands/syncfrom.js
CHANGED
|
@@ -10,7 +10,7 @@ const tslib_1 = require("tslib");
|
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
11
|
const fs = require("fs");
|
|
12
12
|
const path = require("path");
|
|
13
|
-
const utils_1 =
|
|
13
|
+
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
14
14
|
const utils_2 = require("../lib/utils");
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
@@ -48,7 +48,7 @@ class Syncfrom extends core_1.Command {
|
|
|
48
48
|
utils_1.default.pressKeyToExit(`Argument --rootdir is mandatory, when running live! Process will terminate`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
if (utils_1.default.isRoot(
|
|
51
|
+
if (utils_1.default.isRoot()) {
|
|
52
52
|
if (fileVolume === '') {
|
|
53
53
|
fileVolume = '/run/live/medium/live/luks-eggs-backup';
|
|
54
54
|
}
|
|
@@ -81,6 +81,9 @@ class Syncfrom extends core_1.Command {
|
|
|
81
81
|
await this.restorePrivateData();
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
else {
|
|
85
|
+
utils_1.default.useRoot(this.id);
|
|
86
|
+
}
|
|
84
87
|
}
|
|
85
88
|
/**
|
|
86
89
|
*
|
|
@@ -159,5 +162,5 @@ Syncfrom.flags = {
|
|
|
159
162
|
help: core_1.Flags.help({ char: 'h' }),
|
|
160
163
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
161
164
|
};
|
|
162
|
-
|
|
165
|
+
// static aliases = ['restore']
|
|
163
166
|
Syncfrom.examples = ['$ sudo eggs restore'];
|
package/lib/commands/syncto.d.ts
CHANGED
package/lib/commands/syncto.js
CHANGED
|
@@ -26,12 +26,12 @@ const tslib_1 = require("tslib");
|
|
|
26
26
|
const core_1 = require("@oclif/core");
|
|
27
27
|
const fs = require("fs");
|
|
28
28
|
const path = require("path");
|
|
29
|
-
const utils_1 =
|
|
29
|
+
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
30
30
|
const utils_2 = require("../lib/utils");
|
|
31
31
|
// backup
|
|
32
32
|
const promises_1 = require("fs/promises");
|
|
33
33
|
const fs_1 = require("fs");
|
|
34
|
-
const users_1 =
|
|
34
|
+
const users_1 = tslib_1.__importDefault(require("../classes/users"));
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
37
|
*/
|
|
@@ -62,7 +62,7 @@ class Syncto extends core_1.Command {
|
|
|
62
62
|
if (flags.delete) {
|
|
63
63
|
destDelete = true;
|
|
64
64
|
}
|
|
65
|
-
if (utils_1.default.isRoot(
|
|
65
|
+
if (utils_1.default.isRoot()) {
|
|
66
66
|
/**
|
|
67
67
|
* restore con file
|
|
68
68
|
*/
|
|
@@ -85,6 +85,9 @@ class Syncto extends core_1.Command {
|
|
|
85
85
|
await this.luksClose();
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
+
else {
|
|
89
|
+
utils_1.default.useRoot(this.id);
|
|
90
|
+
}
|
|
88
91
|
}
|
|
89
92
|
/**
|
|
90
93
|
*
|
|
@@ -238,5 +241,5 @@ Syncto.flags = {
|
|
|
238
241
|
help: core_1.Flags.help({ char: 'h' }),
|
|
239
242
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
240
243
|
};
|
|
241
|
-
|
|
244
|
+
// static aliases = ['backup']
|
|
242
245
|
Syncto.examples = ['$ sudo eggs syncto'];
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import { Command } from '@oclif/core';
|
|
8
8
|
export default class Clean extends Command {
|
|
9
9
|
static description: string;
|
|
10
|
-
static aliases: string[];
|
|
11
10
|
static flags: {
|
|
12
11
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
13
12
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -8,8 +8,8 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const utils_1 =
|
|
12
|
-
const bleach_1 =
|
|
11
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
12
|
+
const bleach_1 = tslib_1.__importDefault(require("../../classes/bleach"));
|
|
13
13
|
class Clean extends core_1.Command {
|
|
14
14
|
async run() {
|
|
15
15
|
const { flags } = await this.parse(Clean);
|
|
@@ -18,15 +18,20 @@ class Clean extends core_1.Command {
|
|
|
18
18
|
if (flags.verbose) {
|
|
19
19
|
verbose = true;
|
|
20
20
|
}
|
|
21
|
-
if (utils_1.default.isRoot()
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
if (utils_1.default.isRoot()) {
|
|
22
|
+
if (await utils_1.default.customConfirm('Select yes to continue...')) {
|
|
23
|
+
const bleach = new bleach_1.default();
|
|
24
|
+
bleach.clean(verbose);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
utils_1.default.useRoot(this.id);
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
32
|
exports.default = Clean;
|
|
28
33
|
Clean.description = 'clean system log, apt, etc';
|
|
29
|
-
|
|
34
|
+
// static aliases = ['clean']
|
|
30
35
|
Clean.flags = {
|
|
31
36
|
help: core_1.Flags.help({ char: 'h' }),
|
|
32
37
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const utils_1 =
|
|
6
|
-
const i18n_1 =
|
|
5
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
6
|
+
const i18n_1 = tslib_1.__importDefault(require("../../classes/i18n"));
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
@@ -21,8 +21,16 @@ class Locales extends core_1.Command {
|
|
|
21
21
|
}
|
|
22
22
|
const echo = utils_1.default.setEcho(verbose);
|
|
23
23
|
if (utils_1.default.isRoot()) {
|
|
24
|
-
const i18n = new i18n_1.default(verbose);
|
|
25
|
-
|
|
24
|
+
const i18n = new i18n_1.default('/', verbose);
|
|
25
|
+
if (reinstall) {
|
|
26
|
+
await i18n.reinstall();
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
await i18n.generate(true);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
utils_1.default.useRoot(this.id);
|
|
26
34
|
}
|
|
27
35
|
}
|
|
28
36
|
}
|
|
@@ -8,9 +8,9 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const utils_1 =
|
|
11
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
12
12
|
const fs = require("fs");
|
|
13
|
-
const xdg_1 =
|
|
13
|
+
const xdg_1 = tslib_1.__importDefault(require("../../classes/xdg"));
|
|
14
14
|
class Skel extends core_1.Command {
|
|
15
15
|
async run() {
|
|
16
16
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
@@ -32,11 +32,14 @@ class Skel extends core_1.Command {
|
|
|
32
32
|
utils_1.default.titles('skel');
|
|
33
33
|
xdg_1.default.skel(user, verbose);
|
|
34
34
|
}
|
|
35
|
+
else {
|
|
36
|
+
utils_1.default.useRoot(this.id);
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
exports.default = Skel;
|
|
38
41
|
Skel.description = 'update skel from home configuration';
|
|
39
|
-
|
|
42
|
+
// static aliases = ['skel']
|
|
40
43
|
Skel.examples = [
|
|
41
44
|
`$ eggs skel --user mauro
|
|
42
45
|
desktop configuration of user mauro will get used as default`
|
|
@@ -9,7 +9,6 @@ export default class ToolsStat extends Command {
|
|
|
9
9
|
month: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
year: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
};
|
|
12
|
-
static aliases: string[];
|
|
13
12
|
run(): Promise<void>;
|
|
14
13
|
show(start: string, end: string, type?: string): Promise<void>;
|
|
15
14
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const utils_1 =
|
|
6
|
-
const axios_1 =
|
|
7
|
-
const node_https_1 =
|
|
5
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
6
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
7
|
+
const node_https_1 = tslib_1.__importDefault(require("node:https"));
|
|
8
8
|
const agent = new node_https_1.default.Agent({
|
|
9
9
|
rejectUnauthorized: false
|
|
10
10
|
});
|
|
@@ -12,6 +12,7 @@ const agent = new node_https_1.default.Agent({
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
class ToolsStat extends core_1.Command {
|
|
15
|
+
//static aliases = ['stat']
|
|
15
16
|
async run() {
|
|
16
17
|
const { args, flags } = await this.parse(ToolsStat);
|
|
17
18
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
@@ -55,4 +56,3 @@ ToolsStat.flags = {
|
|
|
55
56
|
month: core_1.Flags.boolean({ char: 'm', description: 'current month' }),
|
|
56
57
|
year: core_1.Flags.boolean({ char: 'y', description: 'current year' })
|
|
57
58
|
};
|
|
58
|
-
ToolsStat.aliases = ['stat'];
|
|
@@ -8,10 +8,10 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const shelljs_1 =
|
|
12
|
-
const node_fs_1 =
|
|
13
|
-
const utils_1 =
|
|
14
|
-
const yolk_1 =
|
|
11
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
12
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
13
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
14
|
+
const yolk_1 = tslib_1.__importDefault(require("../../classes/yolk"));
|
|
15
15
|
/**
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
@@ -33,6 +33,9 @@ class DevYolk extends core_1.Command {
|
|
|
33
33
|
const yolk = new yolk_1.default();
|
|
34
34
|
await yolk.create(verbose);
|
|
35
35
|
}
|
|
36
|
+
else {
|
|
37
|
+
utils_1.default.useRoot(this.id);
|
|
38
|
+
}
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
exports.default = DevYolk;
|
package/lib/commands/update.d.ts
CHANGED
|
@@ -13,8 +13,6 @@ export default class Update extends Command {
|
|
|
13
13
|
static examples: string[];
|
|
14
14
|
static flags: {
|
|
15
15
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
16
|
-
apt: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
-
basket: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
16
|
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
17
|
};
|
|
20
18
|
run(): Promise<void>;
|
package/lib/commands/update.js
CHANGED
|
@@ -8,12 +8,11 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const utils_1 =
|
|
12
|
-
const tools_1 =
|
|
13
|
-
const pacman_1 =
|
|
14
|
-
const basket_1 = (0, tslib_1.__importDefault)(require("../classes/basket"));
|
|
11
|
+
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
12
|
+
const tools_1 = tslib_1.__importDefault(require("../classes/tools"));
|
|
13
|
+
const pacman_1 = tslib_1.__importDefault(require("../classes/pacman"));
|
|
15
14
|
const utils_2 = require("../lib/utils");
|
|
16
|
-
const inquirer_1 =
|
|
15
|
+
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
17
16
|
/**
|
|
18
17
|
*
|
|
19
18
|
*/
|
|
@@ -21,48 +20,18 @@ class Update extends core_1.Command {
|
|
|
21
20
|
async run() {
|
|
22
21
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
23
22
|
const { flags } = await this.parse(Update);
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
24
|
+
if (utils_1.default.isRoot()) {
|
|
26
25
|
if (utils_1.default.isSources()) {
|
|
27
26
|
utils_1.default.warning(`You are on penguins-eggs v. ${utils_1.default.getPackageVersion()} from sources`);
|
|
28
27
|
}
|
|
29
28
|
else if (utils_1.default.isDebPackage()) {
|
|
30
29
|
utils_1.default.warning(`You are on eggs-${utils_1.default.getPackageVersion()} installed as package .deb`);
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
aptVersion = await pacman_1.default.packageAptLast('eggs');
|
|
37
|
-
utils_1.default.warning('eggs-' + aptVersion + ' is available via apt');
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
utils_1.default.warning('eggs is not available your repositories');
|
|
41
|
-
}
|
|
42
|
-
const basket = new basket_1.default();
|
|
43
|
-
const basketVersion = await basket.last();
|
|
44
|
-
if (basketVersion !== '') {
|
|
45
|
-
utils_1.default.warning('eggs-' + basketVersion + '-1.deb available in basket');
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Se è specificato il metodo di aggiornamento
|
|
49
|
-
* e, questo corrisponde al tipo di pacchetto
|
|
50
|
-
* installato
|
|
51
|
-
*/
|
|
52
|
-
if (flags.apt || flags.basket) {
|
|
53
|
-
if (utils_1.default.isDebPackage() && flags.apt) {
|
|
54
|
-
await this.getDebFromApt();
|
|
55
|
-
}
|
|
56
|
-
else if (utils_1.default.isDebPackage() && flags.basket) {
|
|
57
|
-
await basket.get();
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
await this.chooseUpdate();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
await this.chooseUpdate();
|
|
65
|
-
}
|
|
31
|
+
await this.chooseUpdate();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
utils_1.default.useRoot(this.id);
|
|
66
35
|
}
|
|
67
36
|
}
|
|
68
37
|
/**
|
|
@@ -71,7 +40,6 @@ class Update extends core_1.Command {
|
|
|
71
40
|
* indipendentemente dal flag
|
|
72
41
|
*/
|
|
73
42
|
async chooseUpdate() {
|
|
74
|
-
const basket = new basket_1.default();
|
|
75
43
|
console.log();
|
|
76
44
|
const choose = await this.chosenDeb();
|
|
77
45
|
utils_1.default.titles(`updating via ${choose}`);
|
|
@@ -80,10 +48,6 @@ class Update extends core_1.Command {
|
|
|
80
48
|
await this.getDebFromApt();
|
|
81
49
|
break;
|
|
82
50
|
}
|
|
83
|
-
case 'basket': {
|
|
84
|
-
await basket.get();
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
51
|
case 'lan': {
|
|
88
52
|
await this.getDebFromLan();
|
|
89
53
|
break;
|
|
@@ -104,14 +68,7 @@ class Update extends core_1.Command {
|
|
|
104
68
|
*/
|
|
105
69
|
async chosenDeb() {
|
|
106
70
|
const choices = ['abort'];
|
|
107
|
-
choices.push('
|
|
108
|
-
/*
|
|
109
|
-
choices.push(new inquirer.Separator('exit from update'), 'basket')
|
|
110
|
-
choices.push(new inquirer.Separator('select, download and update from basket'), 'lan')
|
|
111
|
-
choices.push(new inquirer.Separator('automatic import and update from lan'), 'manual')
|
|
112
|
-
choices.push(new inquirer.Separator('manual download from sourceforge.net and update with dpkg'), 'sources')
|
|
113
|
-
choices.push(new inquirer.Separator('download sources from github.com'))
|
|
114
|
-
*/
|
|
71
|
+
choices.push('apt', 'lan', 'manual', 'sources');
|
|
115
72
|
const questions = [
|
|
116
73
|
{
|
|
117
74
|
type: 'list',
|
|
@@ -149,8 +106,7 @@ class Update extends core_1.Command {
|
|
|
149
106
|
async getDebFromManual() {
|
|
150
107
|
console.log('Download package from: \n\nhttps://sourceforge.net/projects/penguins-eggs/files/packages-deb/');
|
|
151
108
|
console.log('\nand install it with:');
|
|
152
|
-
|
|
153
|
-
console.log('\nsudo dpkg -i eggs_' + (await basket.last()) + '-1.deb');
|
|
109
|
+
console.log('\nsudo dpkg -i eggs_x.x.x-1.deb');
|
|
154
110
|
}
|
|
155
111
|
/**
|
|
156
112
|
* download da LAN
|
|
@@ -183,7 +139,5 @@ Update.description = "update the penguin's eggs tool";
|
|
|
183
139
|
Update.examples = ["$ eggs update\nupdate/upgrade the penguin's eggs tool"];
|
|
184
140
|
Update.flags = {
|
|
185
141
|
help: core_1.Flags.help({ char: 'h' }),
|
|
186
|
-
apt: core_1.Flags.boolean({ char: 'a', description: 'if eggs package is .deb, update from distro repositories' }),
|
|
187
|
-
basket: core_1.Flags.boolean({ char: 'b', description: 'if eggs package is .deb, update from eggs basket' }),
|
|
188
142
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
189
143
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export default class Get extends Command {
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
}[];
|
|
12
|
+
static flags: {
|
|
13
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
6
|
+
// libraries
|
|
7
|
+
const utils_2 = require("../../lib/utils");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
class Get extends core_1.Command {
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(Get);
|
|
15
|
+
let verbose = false;
|
|
16
|
+
if (flags.verbose) {
|
|
17
|
+
verbose = true;
|
|
18
|
+
}
|
|
19
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
20
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
21
|
+
let repo = 'https://github.com/pieroproietti/penguins-wardrobe';
|
|
22
|
+
if (this.argv['0'] !== undefined) {
|
|
23
|
+
repo = this.argv['0'];
|
|
24
|
+
}
|
|
25
|
+
// No sudo for get
|
|
26
|
+
if (process.getuid && process.getuid() === 0) {
|
|
27
|
+
utils_1.default.warning(`You must run: eggs wardrobe get without sudo`);
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
let wardrobe = (0, path_1.basename)(repo); // ~/.eggs-wardrobe
|
|
31
|
+
const result = await (0, utils_2.exec)(`git clone --depth 1 ${repo} ${await utils_1.default.wardrobe()}`);
|
|
32
|
+
if (result.code === 0) {
|
|
33
|
+
utils_1.default.warning(`you get new wardrobe from repo: ${repo} in ${await utils_1.default.wardrobe()}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = Get;
|
|
38
|
+
Get.description = 'get warorobe';
|
|
39
|
+
Get.args = [{ name: 'repo', description: 'repository to get', required: false }];
|
|
40
|
+
Get.flags = {
|
|
41
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
42
|
+
help: core_1.Flags.help({ char: 'h' })
|
|
43
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export declare class Ironing extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
static flags: {
|
|
10
|
+
wardrobe: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Ironing = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
7
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
|
+
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
9
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
10
|
+
class Ironing extends core_1.Command {
|
|
11
|
+
async run() {
|
|
12
|
+
const { args, flags } = await this.parse(Ironing);
|
|
13
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
14
|
+
let verbose = false;
|
|
15
|
+
if (flags.verbose) {
|
|
16
|
+
verbose = true;
|
|
17
|
+
}
|
|
18
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
19
|
+
let wardrobe = await utils_1.default.wardrobe();
|
|
20
|
+
if (flags.wardrobe !== undefined) {
|
|
21
|
+
wardrobe = flags.wardrobe;
|
|
22
|
+
}
|
|
23
|
+
if (!wardrobe.endsWith('/')) {
|
|
24
|
+
wardrobe += '/';
|
|
25
|
+
}
|
|
26
|
+
wardrobe = `${path_1.default.resolve(process.cwd(), wardrobe)}/`;
|
|
27
|
+
if (!fs_1.default.existsSync(wardrobe)) {
|
|
28
|
+
utils_1.default.warning(`wardrobe: ${wardrobe} not found!`);
|
|
29
|
+
process.exit();
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* costume
|
|
33
|
+
*/
|
|
34
|
+
let costume = 'costumes/colibri';
|
|
35
|
+
if (this.argv['0'] !== undefined) {
|
|
36
|
+
costume = this.argv['0'];
|
|
37
|
+
if (costume.substring(0, 8) !== 'costumes' && costume.substring(0, 11) !== 'accessories' && costume.substring(0, 7) !== 'servers') {
|
|
38
|
+
costume = `costumes/${costume}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
costume = wardrobe + costume;
|
|
42
|
+
/**
|
|
43
|
+
* tailorList
|
|
44
|
+
*/
|
|
45
|
+
let tailorList = `${costume}/index.yml`;
|
|
46
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
47
|
+
utils_1.default.warning(`index.yml not found in : ${costume}!`);
|
|
48
|
+
process.exit();
|
|
49
|
+
}
|
|
50
|
+
const orig = js_yaml_1.default.load(fs_1.default.readFileSync(tailorList, 'utf-8'));
|
|
51
|
+
let sorted = orig;
|
|
52
|
+
sorted.name = orig.name;
|
|
53
|
+
sorted.description = orig.description;
|
|
54
|
+
sorted.author = orig.author;
|
|
55
|
+
sorted.release = orig.release;
|
|
56
|
+
sorted.distributions = orig.distributions.sort();
|
|
57
|
+
if (orig.sequence !== undefined) {
|
|
58
|
+
if (orig.sequence.repositories !== undefined) {
|
|
59
|
+
sorted.sequence.repositories = orig.sequence.repositories;
|
|
60
|
+
if (orig.sequence.repositories.sources_list !== undefined) {
|
|
61
|
+
sorted.sequence.repositories.sources_list = orig.sequence.repositories.sources_list;
|
|
62
|
+
}
|
|
63
|
+
if (orig.sequence.repositories.sources_list_d !== undefined) {
|
|
64
|
+
sorted.sequence.repositories.sources_list_d = orig.sequence.repositories.sources_list_d;
|
|
65
|
+
}
|
|
66
|
+
sorted.sequence.repositories.update = orig.sequence.repositories.update;
|
|
67
|
+
sorted.sequence.repositories.upgrade = orig.sequence.repositories.upgrade;
|
|
68
|
+
}
|
|
69
|
+
if (orig.sequence.preinst !== undefined) {
|
|
70
|
+
sorted.sequence.preinst = orig.sequence.preinst;
|
|
71
|
+
}
|
|
72
|
+
if (orig.sequence.packages !== undefined) {
|
|
73
|
+
if (Array.isArray(orig.sequence.packages)) {
|
|
74
|
+
sorted.sequence.packages = orig.sequence.packages.sort();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (orig.sequence.packages_no_install_recommends !== undefined) {
|
|
78
|
+
if (Array.isArray(orig.sequence.packages_no_install_recommends)) {
|
|
79
|
+
sorted.sequence.packages_no_install_recommends = orig.sequence.packages_no_install_recommends.sort();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (orig.sequence.debs !== undefined) {
|
|
83
|
+
sorted.sequence.debs = orig.sequence.debs;
|
|
84
|
+
}
|
|
85
|
+
if (orig.sequence.packages_python !== undefined) {
|
|
86
|
+
if (Array.isArray(orig.sequence.packages_python)) {
|
|
87
|
+
sorted.sequence.packages_python = orig.sequence.packages_python.sort();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (orig.sequence.accessories !== undefined) {
|
|
91
|
+
if (Array.isArray(orig.sequence.accessories)) {
|
|
92
|
+
sorted.sequence.accessories = orig.sequence.accessories.sort();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (orig.customize !== undefined) {
|
|
97
|
+
sorted.customize = orig.customize;
|
|
98
|
+
if (orig.customize.dirs !== undefined) {
|
|
99
|
+
sorted.customize.dirs = orig.customize.dirs;
|
|
100
|
+
}
|
|
101
|
+
if (orig.customize.hostname !== undefined) {
|
|
102
|
+
sorted.customize.hostname = orig.customize.hostname;
|
|
103
|
+
}
|
|
104
|
+
if (orig.customize.scripts !== undefined) {
|
|
105
|
+
orig.customize.scripts = orig.customize.scripts;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (orig.reboot !== undefined) {
|
|
109
|
+
sorted.reboot = orig.reboot;
|
|
110
|
+
}
|
|
111
|
+
const ironed = `# costume: ${costume}\n---\n` + js_yaml_1.default.dump(sorted);
|
|
112
|
+
console.log(ironed);
|
|
113
|
+
// Well be usefull to have scrolling
|
|
114
|
+
// Set scrolling margins back to default.
|
|
115
|
+
// await exec(`printf '\e[;r'`)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.Ironing = Ironing;
|
|
119
|
+
Ironing.description = 'ordered show of costumes or accessories in wardrobe';
|
|
120
|
+
Ironing.args = [{ name: 'costume', description: 'costume', required: false }];
|
|
121
|
+
Ironing.flags = {
|
|
122
|
+
wardrobe: core_1.Flags.string({ char: 'w', description: 'wardrobe' }),
|
|
123
|
+
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
124
|
+
help: core_1.Flags.help({ char: 'h' })
|
|
125
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export default class List extends Command {
|
|
6
|
+
static description: string;
|
|
7
|
+
static args: {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
}[];
|
|
12
|
+
static flags: {
|
|
13
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|