penguins-eggs 9.3.22 → 9.3.23
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 +1 -1
- package/README.md +127 -64
- package/dist/commands/adapt.js +4 -2
- package/dist/commands/analyze.js +2 -2
- package/dist/commands/calamares.js +7 -2
- package/dist/commands/config.js +6 -3
- package/dist/commands/cuckoo.js +4 -6
- package/dist/commands/dad.js +6 -1
- package/dist/commands/export/deb.js +6 -1
- package/dist/commands/export/iso.js +6 -1
- package/dist/commands/install.js +6 -2
- package/dist/commands/kill.js +4 -2
- package/dist/commands/mom.js +5 -2
- package/dist/commands/produce.js +7 -8
- package/dist/commands/status.js +4 -1
- package/dist/commands/syncfrom.js +5 -3
- package/dist/commands/syncto.js +5 -3
- package/dist/commands/tools/clean.js +4 -2
- package/dist/commands/tools/ppa.js +5 -1
- package/dist/commands/tools/skel.js +5 -6
- package/dist/commands/tools/stat.js +6 -1
- package/dist/commands/tools/yolk.js +4 -2
- package/dist/commands/update.js +4 -2
- package/dist/commands/wardrobe/get.js +6 -2
- package/dist/commands/wardrobe/list.js +6 -2
- package/dist/commands/wardrobe/show.js +7 -2
- package/dist/commands/wardrobe/wear.js +7 -2
- package/dist/lib/dependencies.js +7 -6
- package/package.json +3 -3
- package/scripts/README.md +120 -0
- package/scripts/includes/common.sh +59 -0
- package/scripts/includes/easybashgui +1695 -0
- package/scripts/includes/easybashgui-debug +146 -0
- package/scripts/includes/easybashgui.lib +8039 -0
- package/scripts/includes/easybashlib +550 -0
- package/scripts/includes/easydialog-legacy +163 -0
- package/scripts/mom.sh +56 -0
- /package/scripts/{mom-cli.sh → old-mom-cli.sh} +0 -0
|
@@ -43,10 +43,15 @@ class ExportDeb extends core_1.Command {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
exports.default = ExportDeb;
|
|
46
|
-
ExportDeb.description = 'export deb/docs/iso to the destination host';
|
|
47
46
|
ExportDeb.flags = {
|
|
48
47
|
all: core_1.Flags.boolean({ char: 'a', description: 'export all archs' }),
|
|
49
48
|
clean: core_1.Flags.boolean({ char: 'c', description: 'remove old .deb before to copy' }),
|
|
50
49
|
help: core_1.Flags.help({ char: 'h' }),
|
|
51
50
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
52
51
|
};
|
|
52
|
+
ExportDeb.description = 'export deb/docs/iso to the destination host';
|
|
53
|
+
ExportDeb.examples = [
|
|
54
|
+
"eggs export deb",
|
|
55
|
+
"eggs export deb --clean",
|
|
56
|
+
"eggs export deb --all",
|
|
57
|
+
];
|
|
@@ -41,10 +41,15 @@ class ExportIso extends core_1.Command {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.default = ExportIso;
|
|
44
|
-
ExportIso.description = 'export iso in the destination host';
|
|
45
44
|
ExportIso.flags = {
|
|
46
45
|
backup: core_1.Flags.boolean({ char: 'b', description: 'export backup ISOs' }),
|
|
47
46
|
clean: core_1.Flags.boolean({ char: 'c', description: 'delete old ISOs before to copy' }),
|
|
48
47
|
help: core_1.Flags.help({ char: 'h' }),
|
|
49
48
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
50
49
|
};
|
|
50
|
+
ExportIso.description = 'export iso in the destination host';
|
|
51
|
+
ExportIso.examples = [
|
|
52
|
+
"eggs export iso",
|
|
53
|
+
"eggs export iso --clean",
|
|
54
|
+
"eggs export iso --backup"
|
|
55
|
+
];
|
package/dist/commands/install.js
CHANGED
|
@@ -98,5 +98,9 @@ Install.flags = {
|
|
|
98
98
|
unattended: core_1.Flags.boolean({ char: 'u', description: 'Unattended installation' }),
|
|
99
99
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'Verbose' })
|
|
100
100
|
};
|
|
101
|
-
Install.description = '
|
|
102
|
-
Install.examples = [
|
|
101
|
+
Install.description = 'krill: the CLI system installer - the egg became a penguin!';
|
|
102
|
+
Install.examples = [
|
|
103
|
+
"sudo eggs install",
|
|
104
|
+
"sudo eggs install --unattended",
|
|
105
|
+
"sudo eggs install --custom it"
|
|
106
|
+
];
|
package/dist/commands/kill.js
CHANGED
|
@@ -42,9 +42,11 @@ class Kill extends core_1.Command {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
exports.default = Kill;
|
|
45
|
-
Kill.description = 'kill the eggs/free the nest';
|
|
46
45
|
Kill.flags = {
|
|
47
46
|
help: core_1.Flags.help({ char: 'h' }),
|
|
48
47
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
49
48
|
};
|
|
50
|
-
Kill.
|
|
49
|
+
Kill.description = 'kill the eggs/free the nest';
|
|
50
|
+
Kill.examples = [
|
|
51
|
+
"sudo eggs kill"
|
|
52
|
+
];
|
package/dist/commands/mom.js
CHANGED
|
@@ -19,12 +19,15 @@ class Mom extends core_1.Command {
|
|
|
19
19
|
utils_1.default.warning('You must to be kind with your mom! Call her without sudo');
|
|
20
20
|
process.exit(0);
|
|
21
21
|
}
|
|
22
|
-
const cmd = node_path_1.default.resolve(__dirname, '../../scripts/mom
|
|
22
|
+
const cmd = node_path_1.default.resolve(__dirname, '../../scripts/mom.sh');
|
|
23
23
|
await (0, utils_2.exec)(cmd);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.default = Mom;
|
|
27
|
-
Mom.description = 'ask for mommy - gui helper';
|
|
28
27
|
Mom.flags = {
|
|
29
28
|
help: core_1.Flags.help({ char: 'h' })
|
|
30
29
|
};
|
|
30
|
+
Mom.description = 'ask help from mommy - TUI helper';
|
|
31
|
+
Mom.examples = [
|
|
32
|
+
"eggs mom"
|
|
33
|
+
];
|
package/dist/commands/produce.js
CHANGED
|
@@ -142,12 +142,11 @@ Produce.flags = {
|
|
|
142
142
|
};
|
|
143
143
|
Produce.description = 'produce a live image from your system whithout your data';
|
|
144
144
|
Produce.examples = [
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
'$ sudo eggs produce -vs --basename leo --rsupport \nproduce scripts to build an ISO as the previus example. Scripts can be found\nin /home/eggs/ovarium and you can customize all you need\n'
|
|
145
|
+
"sudo eggs produce",
|
|
146
|
+
"sudo eggs produce --fast",
|
|
147
|
+
"sudo eggs produce --max",
|
|
148
|
+
"sudo eggs produce --fast --basename=colibri",
|
|
149
|
+
"sudo eggs produce --fast --basename=colibri --theme /path/to/theme --addons adapt",
|
|
150
|
+
"sudo eggs produce --fast --clone",
|
|
151
|
+
"sudo eggs produce --fast --backup",
|
|
153
152
|
];
|
package/dist/commands/status.js
CHANGED
|
@@ -23,8 +23,11 @@ class Status extends core_1.Command {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
exports.default = Status;
|
|
26
|
-
Status.description = 'informations about eggs status';
|
|
27
26
|
Status.flags = {
|
|
28
27
|
help: core_1.Flags.help({ char: 'h' }),
|
|
29
28
|
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
30
29
|
};
|
|
30
|
+
Status.description = 'informations about eggs status';
|
|
31
|
+
Status.examples = [
|
|
32
|
+
"eggs status"
|
|
33
|
+
];
|
|
@@ -152,7 +152,6 @@ class Syncfrom extends core_1.Command {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
exports.default = Syncfrom;
|
|
155
|
-
Syncfrom.description = 'restore users and user data from a LUKS volumes';
|
|
156
155
|
Syncfrom.flags = {
|
|
157
156
|
delete: core_1.Flags.string({ description: 'rsync --delete delete extraneous files from dest dirs' }),
|
|
158
157
|
file: core_1.Flags.string({ char: 'f', description: "file LUKS volume encrypted" }),
|
|
@@ -160,5 +159,8 @@ Syncfrom.flags = {
|
|
|
160
159
|
rootdir: core_1.Flags.string({ char: 'r', description: 'rootdir of the installed system, when used from live' }),
|
|
161
160
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
162
161
|
};
|
|
163
|
-
|
|
164
|
-
Syncfrom.examples = [
|
|
162
|
+
Syncfrom.description = 'restore users and user data from a LUKS volumes';
|
|
163
|
+
Syncfrom.examples = [
|
|
164
|
+
'sudo eggs restore',
|
|
165
|
+
'sudo eggs restore --file /path/to/fileLUKS',
|
|
166
|
+
];
|
package/dist/commands/syncto.js
CHANGED
|
@@ -234,12 +234,14 @@ class Syncto extends core_1.Command {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
exports.default = Syncto;
|
|
237
|
-
Syncto.description = `saves users and user data in a LUKS volume inside the iso`;
|
|
238
237
|
Syncto.flags = {
|
|
239
238
|
delete: core_1.Flags.string({ description: 'rsync --delete delete extraneous files from dest dirs' }),
|
|
240
239
|
file: core_1.Flags.string({ char: 'f', description: "file LUKS volume encrypted" }),
|
|
241
240
|
help: core_1.Flags.help({ char: 'h' }),
|
|
242
241
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
243
242
|
};
|
|
244
|
-
|
|
245
|
-
Syncto.examples = [
|
|
243
|
+
Syncto.description = `saves users and user data in a LUKS volume inside the iso`;
|
|
244
|
+
Syncto.examples = [
|
|
245
|
+
"sudo eggs syncto",
|
|
246
|
+
"sudo eggs syncto --file /path/to/fileLUKS"
|
|
247
|
+
];
|
|
@@ -30,9 +30,11 @@ class Clean extends core_1.Command {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.default = Clean;
|
|
33
|
-
Clean.description = 'clean system log, apt, etc';
|
|
34
|
-
// static aliases = ['clean']
|
|
35
33
|
Clean.flags = {
|
|
36
34
|
help: core_1.Flags.help({ char: 'h' }),
|
|
37
35
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
38
36
|
};
|
|
37
|
+
Clean.description = 'clean system log, apt, etc';
|
|
38
|
+
Clean.examples = [
|
|
39
|
+
"sudo eggs tools clean"
|
|
40
|
+
];
|
|
@@ -49,13 +49,17 @@ class Ppa extends core_1.Command {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
exports.default = Ppa;
|
|
52
|
-
Ppa.description = 'add/remove PPA repositories (Debian family)';
|
|
53
52
|
Ppa.flags = {
|
|
54
53
|
add: core_1.Flags.boolean({ char: 'a', description: 'add penguins-eggs PPA repository' }),
|
|
55
54
|
help: core_1.Flags.help({ char: 'h' }),
|
|
56
55
|
remove: core_1.Flags.boolean({ char: 'r', description: 'remove penguins-eggs PPA repository' }),
|
|
57
56
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
58
57
|
};
|
|
58
|
+
Ppa.description = 'add/remove PPA repositories (Debian family)';
|
|
59
|
+
Ppa.examples = [
|
|
60
|
+
"sudo eggs tools ppa --add",
|
|
61
|
+
"sudo eggs tools ppa --remove",
|
|
62
|
+
];
|
|
59
63
|
/**
|
|
60
64
|
* add ppa
|
|
61
65
|
*/
|
|
@@ -38,14 +38,13 @@ class Skel extends core_1.Command {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
exports.default = Skel;
|
|
41
|
-
Skel.description = 'update skel from home configuration';
|
|
42
|
-
// static aliases = ['skel']
|
|
43
|
-
Skel.examples = [
|
|
44
|
-
`$ eggs skel --user mauro
|
|
45
|
-
desktop configuration of user mauro will get used as default`
|
|
46
|
-
];
|
|
47
41
|
Skel.flags = {
|
|
48
42
|
help: core_1.Flags.help({ char: 'h' }),
|
|
49
43
|
user: core_1.Flags.string({ char: 'u', description: 'user to be used' }),
|
|
50
44
|
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
51
45
|
};
|
|
46
|
+
Skel.description = 'update skel from home configuration';
|
|
47
|
+
Skel.examples = [
|
|
48
|
+
"sudo eggs skel",
|
|
49
|
+
"sudo eggs skel --user user-to-be-copied"
|
|
50
|
+
];
|
|
@@ -58,9 +58,14 @@ class ToolsStat extends core_1.Command {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
exports.default = ToolsStat;
|
|
61
|
-
ToolsStat.description = 'get statistics from sourceforge';
|
|
62
61
|
ToolsStat.flags = {
|
|
63
62
|
help: core_1.Flags.help({ char: 'h' }),
|
|
64
63
|
month: core_1.Flags.boolean({ char: 'm', description: 'current month' }),
|
|
65
64
|
year: core_1.Flags.boolean({ char: 'y', description: 'current year' })
|
|
66
65
|
};
|
|
66
|
+
ToolsStat.description = 'get statistics from sourceforge';
|
|
67
|
+
ToolsStat.examples = [
|
|
68
|
+
"eggs tools stat",
|
|
69
|
+
"eggs tools stat --month",
|
|
70
|
+
"eggs tools stat --year",
|
|
71
|
+
];
|
|
@@ -39,10 +39,12 @@ class DevYolk extends core_1.Command {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.default = DevYolk;
|
|
42
|
-
DevYolk.description = 'configure eggs to install without internet';
|
|
43
|
-
DevYolk.examples = ['$ eggs yolk -v'];
|
|
44
42
|
DevYolk.flags = {
|
|
45
43
|
help: core_1.Flags.help({ char: 'h' }),
|
|
46
44
|
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
47
45
|
};
|
|
46
|
+
DevYolk.description = 'configure eggs to install without internet';
|
|
47
|
+
DevYolk.examples = [
|
|
48
|
+
"sudo eggs yolk"
|
|
49
|
+
];
|
|
48
50
|
DevYolk.dir = '/var/local/yolk';
|
package/dist/commands/update.js
CHANGED
|
@@ -135,9 +135,11 @@ class Update extends core_1.Command {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
exports.default = Update;
|
|
138
|
-
Update.description = "update the penguin's eggs tool";
|
|
139
|
-
Update.examples = ["$ eggs update\nupdate/upgrade the penguin's eggs tool"];
|
|
140
138
|
Update.flags = {
|
|
141
139
|
help: core_1.Flags.help({ char: 'h' }),
|
|
142
140
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
143
141
|
};
|
|
142
|
+
Update.description = "update the penguin's eggs tool";
|
|
143
|
+
Update.examples = [
|
|
144
|
+
"eggs update"
|
|
145
|
+
];
|
|
@@ -35,9 +35,13 @@ class Get extends core_1.Command {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
exports.default = Get;
|
|
38
|
-
Get.description = 'get warorobe';
|
|
39
|
-
Get.args = [{ name: 'repo', description: 'repository to get', required: false }];
|
|
40
38
|
Get.flags = {
|
|
41
39
|
help: core_1.Flags.help({ char: 'h' }),
|
|
42
40
|
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
43
41
|
};
|
|
42
|
+
Get.args = [{ name: 'repo', description: 'repository to get', required: false }];
|
|
43
|
+
Get.description = 'get warorobe';
|
|
44
|
+
Get.examples = [
|
|
45
|
+
"eggs wardrobe get",
|
|
46
|
+
"eggs wardrobe get your-wardrobe"
|
|
47
|
+
];
|
|
@@ -73,9 +73,13 @@ class List extends core_1.Command {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
exports.default = List;
|
|
76
|
-
List.description = 'list costumes and accessoires in wardrobe';
|
|
77
|
-
List.args = [{ name: 'wardrobe', description: 'wardrobe', required: false }];
|
|
78
76
|
List.flags = {
|
|
79
77
|
help: core_1.Flags.help({ char: 'h' }),
|
|
80
78
|
verbose: core_1.Flags.boolean({ char: 'v' })
|
|
81
79
|
};
|
|
80
|
+
List.args = [{ name: 'wardrobe', description: 'wardrobe', required: false }];
|
|
81
|
+
List.description = 'list costumes and accessoires in wardrobe';
|
|
82
|
+
List.examples = [
|
|
83
|
+
"eggs wardrobe list",
|
|
84
|
+
"eggs wardrobe list your-wardrove",
|
|
85
|
+
];
|
|
@@ -61,11 +61,16 @@ class Show extends core_1.Command {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
exports.default = Show;
|
|
64
|
-
Show.description = 'show costumes/accessories in wardrobe';
|
|
65
|
-
Show.args = [{ name: 'costume', description: 'costume', required: false }];
|
|
66
64
|
Show.flags = {
|
|
67
65
|
help: core_1.Flags.help({ char: 'h' }),
|
|
68
66
|
json: core_1.Flags.boolean({ char: 'j', description: 'output JSON' }),
|
|
69
67
|
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
70
68
|
wardrobe: core_1.Flags.string({ char: 'w', description: 'wardrobe' }),
|
|
71
69
|
};
|
|
70
|
+
Show.description = 'show costumes/accessories in wardrobe';
|
|
71
|
+
Show.args = [{ name: 'costume', description: 'costume', required: false }];
|
|
72
|
+
Show.example = [
|
|
73
|
+
"eggs wardrobe show colibri",
|
|
74
|
+
"eggs wardrobe show accessories/firmwares",
|
|
75
|
+
"eggs wardrobe show accessories/"
|
|
76
|
+
];
|
|
@@ -72,8 +72,6 @@ class Wear extends core_1.Command {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
exports.default = Wear;
|
|
75
|
-
Wear.description = 'wear costume/accessories from wardrobe';
|
|
76
|
-
Wear.args = [{ name: 'costume', description: 'costume', required: false }];
|
|
77
75
|
Wear.flags = {
|
|
78
76
|
help: core_1.Flags.help({ char: 'h' }),
|
|
79
77
|
no_accessories: core_1.Flags.boolean({ char: 'a', description: 'not install accessories' }),
|
|
@@ -82,3 +80,10 @@ Wear.flags = {
|
|
|
82
80
|
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
83
81
|
wardrobe: core_1.Flags.string({ char: 'w', description: 'wardrobe' }),
|
|
84
82
|
};
|
|
83
|
+
Wear.description = 'wear costume/accessories from wardrobe';
|
|
84
|
+
Wear.args = [{ name: 'costume', description: 'costume', required: false }];
|
|
85
|
+
Wear.examples = [
|
|
86
|
+
"sudo eggs wardrobe wear duck",
|
|
87
|
+
"sudo eggs wardrobe wear accessories/firmwares",
|
|
88
|
+
"sudo eggs wardrobe wear wagtail/waydroid"
|
|
89
|
+
];
|
package/dist/lib/dependencies.js
CHANGED
|
@@ -42,24 +42,25 @@ exports.array2spaced = array2spaced;
|
|
|
42
42
|
* sudo apt purge cryptsetup dosfstools dpkg-dev isolinux live-boot live-boot-initramfs-tools squashfs-tools syslinux-common coreutils xorriso
|
|
43
43
|
*/
|
|
44
44
|
exports.depCommon = [
|
|
45
|
+
'coreutils',
|
|
45
46
|
'cryptsetup',
|
|
46
47
|
'curl',
|
|
47
48
|
'dosfstools',
|
|
48
49
|
'dpkg-dev',
|
|
49
|
-
'isolinux',
|
|
50
50
|
'git',
|
|
51
|
-
'
|
|
51
|
+
'isolinux',
|
|
52
|
+
'jq',
|
|
52
53
|
'live-boot-initramfs-tools',
|
|
54
|
+
'live-boot',
|
|
53
55
|
'lsb-release',
|
|
54
56
|
'lvm2',
|
|
55
57
|
'parted',
|
|
56
|
-
|
|
58
|
+
'pxelinux',
|
|
57
59
|
'rsync',
|
|
58
|
-
'sshfs',
|
|
59
60
|
'squashfs-tools',
|
|
61
|
+
'sshfs',
|
|
60
62
|
'syslinux-common',
|
|
61
|
-
'
|
|
62
|
-
'xorriso' // eggs
|
|
63
|
+
'xorriso', // eggs
|
|
63
64
|
];
|
|
64
65
|
/**
|
|
65
66
|
* Dependencies for architectures
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"description": "Perri's Brewery edition: remaster your system and distribuite it",
|
|
4
|
-
"version": "9.3.
|
|
4
|
+
"version": "9.3.23",
|
|
5
5
|
"author": "Piero Proietti @pieroproietti",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eggs": "bin/run"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"mocha": "^10.2.0",
|
|
56
56
|
"nyc": "^15.1.0",
|
|
57
57
|
"oclif-pnpm": "^3.4.3-1",
|
|
58
|
-
"perrisbrewery": "^9.3.
|
|
58
|
+
"perrisbrewery": "^9.3.15",
|
|
59
59
|
"ts-node": "^10.9.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
"build": "tsc -p .",
|
|
112
112
|
"deb": "oclif pack:deb && pb deb ./",
|
|
113
113
|
"docs": "rm docs -rf && npx typedoc src --out docs",
|
|
114
|
-
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
115
114
|
"lint-and-fix": "eslint . --ext .ts --fix --config .eslintrc",
|
|
115
|
+
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
116
116
|
"posttest": "eslint . --ext .ts --config .eslintrc",
|
|
117
117
|
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",
|
|
118
118
|
"tarballs": "oclif pack:tarballs --root=. --targets=linux-x64 --no-xz",
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Test su manifest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Seleziona un comando:
|
|
5
|
+
```
|
|
6
|
+
.commands[] | select(.id =="calamares")
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
getFlagsNames() {
|
|
10
|
+
[jq]> .commands[] | select(.id=="calamares").flags[] | .name
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
in bash?
|
|
16
|
+
.commands[] | select(.id =="$answer")
|
|
17
|
+
|
|
18
|
+
# project eggs TUI/GUI
|
|
19
|
+
|
|
20
|
+
# Tools
|
|
21
|
+
* [jq](https://stedolan.github.io/jq/) jq original
|
|
22
|
+
* [yq](https://github.com/mikefarah/yq) a lightweight and portable command-line YAML, JSON and XML processor.
|
|
23
|
+
* [jiq](https://github.com/fiatjaf/jiq) you can drill down interactively by using jq filtering queries.
|
|
24
|
+
|
|
25
|
+
# References
|
|
26
|
+
* [pure-bash-bible](https://github.com/dylanaraps/pure-bash-bible#table-of-contents)
|
|
27
|
+
|
|
28
|
+
# Plan
|
|
29
|
+
I want to get something like that - note we discard help and nointeractive -:
|
|
30
|
+
|
|
31
|
+
## main menu
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
===================================================
|
|
35
|
+
eggs
|
|
36
|
+
|
|
37
|
+
On the road of Remastersys, Refracta, Systemback and father Knoppix!
|
|
38
|
+
|
|
39
|
+
adapt
|
|
40
|
+
calamares
|
|
41
|
+
dad
|
|
42
|
+
help
|
|
43
|
+
kill
|
|
44
|
+
install
|
|
45
|
+
produce
|
|
46
|
+
syncfrom
|
|
47
|
+
syncto
|
|
48
|
+
status
|
|
49
|
+
update
|
|
50
|
+
export
|
|
51
|
+
tools
|
|
52
|
+
```
|
|
53
|
+
After we will select one choise, we will go in a form for the command. I just create same samples: calamares, install and produce.
|
|
54
|
+
|
|
55
|
+
## calamares
|
|
56
|
+
```
|
|
57
|
+
===================================================
|
|
58
|
+
calamares
|
|
59
|
+
|
|
60
|
+
calamares configuration or install and configure it
|
|
61
|
+
[ ] install
|
|
62
|
+
[ ] release
|
|
63
|
+
[ ] remove
|
|
64
|
+
[ ] theme: ________________
|
|
65
|
+
[ ] verbose
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## install
|
|
69
|
+
```
|
|
70
|
+
===================================================
|
|
71
|
+
install
|
|
72
|
+
|
|
73
|
+
krill TUI system installer - the egg becomes a chick
|
|
74
|
+
[ ] none
|
|
75
|
+
[ ] suspend
|
|
76
|
+
[ ] custom: ________________
|
|
77
|
+
[ ] domain: ________________
|
|
78
|
+
[ ] ip
|
|
79
|
+
[ ] crypted
|
|
80
|
+
[ ] pve
|
|
81
|
+
[ ] random
|
|
82
|
+
[ ] small
|
|
83
|
+
[ ] unattended
|
|
84
|
+
[ ] verbose
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## produce
|
|
88
|
+
```
|
|
89
|
+
===================================================
|
|
90
|
+
produce
|
|
91
|
+
|
|
92
|
+
the system produces an egg: iso image of your system
|
|
93
|
+
|
|
94
|
+
[ ] backup
|
|
95
|
+
[ ] basename: ________________
|
|
96
|
+
[ ] clone
|
|
97
|
+
[ ] fast
|
|
98
|
+
[ ] max
|
|
99
|
+
[ ] prefix: ________________
|
|
100
|
+
[ ] release
|
|
101
|
+
[ ] script
|
|
102
|
+
[ ] theme: ________________
|
|
103
|
+
[ ] verbose
|
|
104
|
+
[ ] yolk
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
# .oclif.manifest.json
|
|
108
|
+
|
|
109
|
+
After wrote the entire mom.yaml I realized there is the opportunity of use the file .oclif.manifest.json this is automatically generated and update when I create eggs package.
|
|
110
|
+
|
|
111
|
+
# problems
|
|
112
|
+
I can't find a way to select the contents of command, if not by:
|
|
113
|
+
```
|
|
114
|
+
flags=$(jq '.options.menuEntry[0].flags' eggs.json )
|
|
115
|
+
```
|
|
116
|
+
I see in manifest, they use objects inside object with a field: id, can be a solution? I don't know.
|
|
117
|
+
|
|
118
|
+
It's very interesting for me to use jq or yt, expecially thinking I can build an approch starting from manifest.yaml, but at the moment not capable to go too inside.
|
|
119
|
+
|
|
120
|
+
But if you will continue in same way, I will jump on again.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# set -e
|
|
3
|
+
|
|
4
|
+
export PATH="$MAIN_SCRIPT_PATH/includes:$PATH"
|
|
5
|
+
|
|
6
|
+
#setup colors
|
|
7
|
+
red=`tput setaf 1`
|
|
8
|
+
green=`tput setaf 2`
|
|
9
|
+
yellow=`tput setaf 3`
|
|
10
|
+
blue=`tput setaf 4`
|
|
11
|
+
purple=`tput setaf 5`
|
|
12
|
+
teal=`tput setaf 6`
|
|
13
|
+
light=`tput setaf 7`
|
|
14
|
+
dark=`tput setaf 8`
|
|
15
|
+
ltred=`tput setaf 9`
|
|
16
|
+
ltgreen=`tput setaf 10`
|
|
17
|
+
ltyellow=`tput setaf 11`
|
|
18
|
+
ltblue=`tput setaf 12`
|
|
19
|
+
ltpurple=`tput setaf 13`
|
|
20
|
+
CL_CYN=`tput setaf 12`
|
|
21
|
+
CL_RST=`tput sgr0`
|
|
22
|
+
reset=`tput sgr0`
|
|
23
|
+
|
|
24
|
+
ask() {
|
|
25
|
+
# https://djm.me/ask
|
|
26
|
+
local prompt default reply
|
|
27
|
+
|
|
28
|
+
if [ "${2:-}" = "Y" ]; then
|
|
29
|
+
prompt="Y/n"
|
|
30
|
+
default=Y
|
|
31
|
+
elif [ "${2:-}" = "N" ]; then
|
|
32
|
+
prompt="y/N"
|
|
33
|
+
default=N
|
|
34
|
+
else
|
|
35
|
+
prompt="y/n"
|
|
36
|
+
default=
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
while true; do
|
|
40
|
+
|
|
41
|
+
# Ask the question (not using "read -p" as it uses stderr not stdout)
|
|
42
|
+
echo -n "$1 [$prompt] "
|
|
43
|
+
|
|
44
|
+
# Read the answer (use /dev/tty in case stdin is redirected from somewhere else)
|
|
45
|
+
read reply </dev/tty
|
|
46
|
+
|
|
47
|
+
# Default?
|
|
48
|
+
if [ -z "$reply" ]; then
|
|
49
|
+
reply=$default
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Check if the reply is valid
|
|
53
|
+
case "$reply" in
|
|
54
|
+
Y*|y*) return 0 ;;
|
|
55
|
+
N*|n*) return 1 ;;
|
|
56
|
+
esac
|
|
57
|
+
|
|
58
|
+
done
|
|
59
|
+
}
|