penguins-eggs 9.1.34 → 9.2.2
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 +41 -78
- package/addons/eggs/theme/applications/install-debian.desktop +2 -2
- package/conf/distros/bionic/calamares/settings.yml +2 -2
- package/conf/distros/buster/calamares/settings.yml +2 -2
- package/conf/distros/focal/calamares/settings.yml +2 -2
- package/conf/distros/rolling/calamares/modules/machineid.yml +4 -0
- package/conf/distros/rolling/calamares/modules/packages.yml +1 -1
- package/conf/distros/rolling/calamares/modules/shellprocess_removelink.yml +6 -0
- package/conf/distros/rolling/calamares/settings.yml +4 -11
- package/conf/exclude.list +81 -96
- package/conf/tools.yaml +1 -1
- package/lib/classes/bleach.js +6 -4
- package/lib/classes/daddy.js +2 -1
- package/lib/classes/distro.js +23 -14
- package/lib/classes/family/archlinux.js +8 -4
- package/lib/classes/incubation/distros/bionic.d.ts +1 -1
- package/lib/classes/incubation/distros/bionic.js +1 -1
- package/lib/classes/incubation/distros/buster.d.ts +1 -1
- package/lib/classes/incubation/distros/buster.js +1 -1
- package/lib/classes/incubation/distros/focal.d.ts +1 -1
- package/lib/classes/incubation/distros/focal.js +1 -1
- package/lib/classes/incubation/distros/jessie.d.ts +1 -1
- package/lib/classes/incubation/distros/jessie.js +1 -1
- package/lib/classes/incubation/distros/rolling.d.ts +3 -3
- package/lib/classes/incubation/distros/rolling.js +4 -5
- package/lib/classes/incubation/fisherman-helper/packages.d.ts +4 -0
- package/lib/classes/incubation/fisherman-helper/packages.js +9 -16
- package/lib/classes/incubation/fisherman.d.ts +1 -1
- package/lib/classes/incubation/fisherman.js +24 -10
- package/lib/classes/incubation/incubator.js +26 -22
- package/lib/classes/ovary.d.ts +2 -1
- package/lib/classes/ovary.js +91 -30
- package/lib/classes/pacman.js +5 -5
- package/lib/classes/utils.d.ts +1 -1
- package/lib/classes/utils.js +5 -4
- package/lib/commands/calamares.js +1 -0
- package/lib/commands/{krill.d.ts → install.d.ts} +0 -1
- package/lib/commands/{krill.js → install.js} +6 -24
- package/lib/commands/produce.d.ts +1 -0
- package/lib/commands/produce.js +5 -7
- package/lib/commands/syncfrom.js +1 -1
- package/lib/commands/syncto.js +1 -1
- package/lib/components/elements/information.js +0 -2
- package/lib/krill/krill-prepare.d.ts +3 -1
- package/lib/krill/krill-prepare.js +8 -2
- package/lib/krill/krill-sequence.d.ts +2 -1
- package/lib/krill/krill-sequence.js +36 -33
- package/lib/krill/modules/bootloader.js +28 -2
- package/lib/krill/modules/initramfs.js +14 -2
- package/lib/krill/modules/{l/303/262cale-cfg.d.ts → locale-cfg.d.ts} +0 -0
- package/lib/krill/modules/{l/303/262cale-cfg.js → locale-cfg.js} +0 -0
- package/lib/krill/modules/set-keyboard.js +3 -3
- package/lib/lib/utils.d.ts +27 -0
- package/lib/lib/utils.js +54 -19
- package/mkinitcpio/archlinux/README.md +116 -0
- package/mkinitcpio/manjaro/README.md +4 -0
- package/package.json +11 -10
- package/scripts/_eggs +21 -20
- package/scripts/eggs.bash +4 -4
- package/scripts/mom-cli.sh +23 -79
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/module.yml +0 -9
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/remove-link.sh +0 -3
- package/lib/commands/remove.d.ts +0 -21
- package/lib/commands/remove.js +0 -84
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"description": "Perri's Brewery edition: remaster your system and distribuite it",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.2.2",
|
|
5
5
|
"author": "Piero Proietti @pieroproietti",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eggs": "bin/run"
|
|
8
8
|
},
|
|
9
9
|
"bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@oclif/core": "^1
|
|
12
|
-
"@oclif/plugin-autocomplete": "
|
|
11
|
+
"@oclif/core": "^1",
|
|
12
|
+
"@oclif/plugin-autocomplete": "1.3.0",
|
|
13
13
|
"@oclif/plugin-help": "^5.1.12",
|
|
14
14
|
"@oclif/plugin-not-found": "^2.3.1",
|
|
15
|
-
"@oclif/plugin-version": "^1.
|
|
15
|
+
"@oclif/plugin-version": "^1.1.1",
|
|
16
16
|
"@oclif/plugin-warn-if-update-available": "^2.0.4",
|
|
17
17
|
"@oclif/test": "^2.1.0",
|
|
18
18
|
"axios": "^0.27.2",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"inquirer": "^8.2.4",
|
|
24
24
|
"js-yaml": "^4.1.0",
|
|
25
25
|
"mustache": "^4.2.0",
|
|
26
|
-
"penguins-oclif": "^3.0.1-1",
|
|
27
26
|
"react": "^17.0.2",
|
|
28
27
|
"shelljs": "0.8.5",
|
|
29
28
|
"tslib": "^2.4.0"
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
"@types/js-yaml": "^4.0.5",
|
|
37
36
|
"@types/mocha": "^9.1.1",
|
|
38
37
|
"@types/mustache": "^4.1.3",
|
|
39
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^18.6.3",
|
|
40
39
|
"@types/react": "^18.0.12",
|
|
41
40
|
"@types/shelljs": "^0.8.11",
|
|
42
41
|
"@typescript-eslint/parser": "^5.27.1",
|
|
@@ -44,16 +43,18 @@
|
|
|
44
43
|
"eslint": "^7.32.0",
|
|
45
44
|
"eslint-config-oclif": "^4.0.0",
|
|
46
45
|
"eslint-config-oclif-typescript": "^1.0.2",
|
|
47
|
-
"globby": "^11
|
|
46
|
+
"globby": "^11",
|
|
48
47
|
"mocha": "^10.0.0",
|
|
49
48
|
"nyc": "^15.1.0",
|
|
50
|
-
"perrisbrewery": "^
|
|
49
|
+
"perrisbrewery": "^9.1.37",
|
|
50
|
+
"penguins-oclif": "^9.1.37",
|
|
51
51
|
"ts-node": "^10.8.1",
|
|
52
|
-
"typedoc": "^0.
|
|
53
|
-
"typescript": "^4.7.
|
|
52
|
+
"typedoc": "^0.23.10",
|
|
53
|
+
"typescript": "^4.7.4"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@typescript-eslint/parser": "^5.0.0",
|
|
57
|
+
"@typescript-eslint/plugin": "^5.0.0",
|
|
57
58
|
"typescript": "^4.6.0"
|
|
58
59
|
},
|
|
59
60
|
"dirname": "eggs",
|
package/scripts/_eggs
CHANGED
|
@@ -16,13 +16,13 @@ _eggs () {
|
|
|
16
16
|
"export\:docs:remove and export docType documentation of the sources in the destination host"
|
|
17
17
|
"export\:iso:export iso in the destination host"
|
|
18
18
|
"info:informations about eggs configuration"
|
|
19
|
-
"
|
|
19
|
+
"install:command-line system installer - the egg became a penguin!"
|
|
20
20
|
"krill:command-line system installer - the egg became a penguin!"
|
|
21
|
+
"kill:kill the eggs/free the nest"
|
|
21
22
|
"mom:ask for mommy - gui helper"
|
|
22
23
|
"produce:produce a live image from your system whithout your data"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"syncto:saving users' datas and accounts on LUKS volume"
|
|
24
|
+
"syncfrom:restore users and user data from a LUKS volumes"
|
|
25
|
+
"syncto:saves users and user data in a LUKS volume inside the iso"
|
|
26
26
|
"tools\:clean:clean system log, apt, etc"
|
|
27
27
|
"tools\:skel:update skel from home configuration"
|
|
28
28
|
"tools\:stat:get statistics from sourceforge"
|
|
@@ -116,23 +116,31 @@ info)
|
|
|
116
116
|
)
|
|
117
117
|
;;
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
install)
|
|
120
120
|
_command_flags=(
|
|
121
|
-
"--
|
|
121
|
+
"--crypted[crypted CLI installation]"
|
|
122
|
+
"--pve[Proxmox VE install]"
|
|
123
|
+
"--help[Show CLI help.]"
|
|
122
124
|
"--verbose[verbose]"
|
|
123
125
|
)
|
|
124
126
|
;;
|
|
125
127
|
|
|
126
128
|
krill)
|
|
127
129
|
_command_flags=(
|
|
128
|
-
"--
|
|
129
|
-
"--crypted[crypted CLI installation]"
|
|
130
|
+
"--crypted[crypted CLI installation]"
|
|
130
131
|
"--pve[Proxmox VE install]"
|
|
131
132
|
"--help[Show CLI help.]"
|
|
132
133
|
"--verbose[verbose]"
|
|
133
134
|
)
|
|
134
135
|
;;
|
|
135
136
|
|
|
137
|
+
kill)
|
|
138
|
+
_command_flags=(
|
|
139
|
+
"--help[Show CLI help.]"
|
|
140
|
+
"--verbose[verbose]"
|
|
141
|
+
)
|
|
142
|
+
;;
|
|
143
|
+
|
|
136
144
|
mom)
|
|
137
145
|
_command_flags=(
|
|
138
146
|
"--help[Show CLI help.]"
|
|
@@ -143,7 +151,8 @@ produce)
|
|
|
143
151
|
_command_flags=(
|
|
144
152
|
"--prefix=-[prefix]:"
|
|
145
153
|
"--basename=-[basename]:"
|
|
146
|
-
"--backup[backup mode]"
|
|
154
|
+
"--backup[backup mode (CRYPTED)]"
|
|
155
|
+
"--clone[clone mode]"
|
|
147
156
|
"--fast[fast compression]"
|
|
148
157
|
"--normal[normal compression]"
|
|
149
158
|
"--max[max compression]"
|
|
@@ -153,16 +162,7 @@ produce)
|
|
|
153
162
|
"--help[Show CLI help.]"
|
|
154
163
|
"--theme=-[theme for livecd, calamares branding and partitions]:"
|
|
155
164
|
"--addons=-[addons to be used: adapt, ichoice, pve, rsupport]:"
|
|
156
|
-
"--release[release:
|
|
157
|
-
)
|
|
158
|
-
;;
|
|
159
|
-
|
|
160
|
-
remove)
|
|
161
|
-
_command_flags=(
|
|
162
|
-
"--purge[remove eggs configurations files]"
|
|
163
|
-
"--autoremove[remove eggs packages dependencies]"
|
|
164
|
-
"--help[Show CLI help.]"
|
|
165
|
-
"--verbose[verbose]"
|
|
165
|
+
"--release[release: max compression, remove penguins-eggs and calamares after installation]"
|
|
166
166
|
)
|
|
167
167
|
;;
|
|
168
168
|
|
|
@@ -278,7 +278,8 @@ help)
|
|
|
278
278
|
|
|
279
279
|
version)
|
|
280
280
|
_command_flags=(
|
|
281
|
-
|
|
281
|
+
"--json[Format output as json.]"
|
|
282
|
+
"--verbose[Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.]"
|
|
282
283
|
)
|
|
283
284
|
;;
|
|
284
285
|
|
package/scripts/eggs.bash
CHANGED
|
@@ -20,11 +20,11 @@ export:deb --help --clean --amd64 --i386 --armel --arm64 --all
|
|
|
20
20
|
export:docs --help
|
|
21
21
|
export:iso --help --backup --clean
|
|
22
22
|
info --verbose --help
|
|
23
|
+
install --crypted --pve --help --verbose
|
|
24
|
+
krill --crypted --pve --help --verbose
|
|
23
25
|
kill --help --verbose
|
|
24
|
-
krill --cli --crypted --pve --help --verbose
|
|
25
26
|
mom --help
|
|
26
|
-
produce --prefix --basename --backup --fast --normal --max --verbose --yolk --script --help --theme --addons --release
|
|
27
|
-
remove --purge --autoremove --help --verbose
|
|
27
|
+
produce --prefix --basename --backup --clone --fast --normal --max --verbose --yolk --script --help --theme --addons --release
|
|
28
28
|
syncfrom --delete --file --rootdir --help --verbose
|
|
29
29
|
syncto --delete --file --help --verbose
|
|
30
30
|
tools:clean --help --verbose
|
|
@@ -39,7 +39,7 @@ wardrobe:show --wardrobe --json --verbose --help
|
|
|
39
39
|
wardrobe:wear --wardrobe --no_accessories --no_firmwares --silent --verbose --help
|
|
40
40
|
autocomplete --refresh-cache
|
|
41
41
|
help --nested-commands
|
|
42
|
-
version
|
|
42
|
+
version --json --verbose
|
|
43
43
|
"
|
|
44
44
|
|
|
45
45
|
function __trim_colon_commands()
|
package/scripts/mom-cli.sh
CHANGED
|
@@ -13,7 +13,6 @@ function main {
|
|
|
13
13
|
# 20 righe. 75 caratteri, 16 altezza menu list
|
|
14
14
|
answer=$(
|
|
15
15
|
whiptail --title "mommy" --menu "Mama's gonna keep baby cozy and warm..." 22 75 16 \
|
|
16
|
-
"config" "configure eggs, install prerequisites" \
|
|
17
16
|
"adapt" "adapt monitor resolution for VM only" \
|
|
18
17
|
"calamares" "configure calamares or install and configure it" \
|
|
19
18
|
"dad" "ask help from daddy - configuration helper" \
|
|
@@ -22,12 +21,11 @@ function main {
|
|
|
22
21
|
"kill" "kill the eggs/free the nest" \
|
|
23
22
|
"krill" "krill TUI system installer - the egg becomes a chick" \
|
|
24
23
|
"produce" "the system produces an egg: iso image of your system" \
|
|
25
|
-
"remove" "remove eggs and others stuff" \
|
|
26
24
|
"update" "update the penguin's eggs tool" \
|
|
27
25
|
"documentation" "book/book_translated/manual/man" \
|
|
28
26
|
"export" "deb/docs/iso" \
|
|
29
|
-
"tools" "clean/
|
|
30
|
-
"wardrobe" "get/
|
|
27
|
+
"tools" "clean/skel/yolk" \
|
|
28
|
+
"wardrobe" "get/list/show/wear" \
|
|
31
29
|
"quit" "exit" 3>&2 2>&1 1>&3
|
|
32
30
|
)
|
|
33
31
|
|
|
@@ -62,9 +60,6 @@ function main {
|
|
|
62
60
|
"produce")
|
|
63
61
|
produce ;;
|
|
64
62
|
|
|
65
|
-
"remove")
|
|
66
|
-
remove ;;
|
|
67
|
-
|
|
68
63
|
"documentation")
|
|
69
64
|
documentation ;;
|
|
70
65
|
|
|
@@ -87,13 +82,7 @@ function main {
|
|
|
87
82
|
|
|
88
83
|
################################
|
|
89
84
|
function adapt {
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
################################
|
|
94
|
-
function config {
|
|
95
|
-
sudo eggs config
|
|
96
|
-
press_a_key_to_continue
|
|
85
|
+
adapt
|
|
97
86
|
}
|
|
98
87
|
|
|
99
88
|
################################
|
|
@@ -260,10 +249,11 @@ function krill {
|
|
|
260
249
|
function produce {
|
|
261
250
|
answer=$(
|
|
262
251
|
whiptail --title "produce" --menu "Choose the prefered method of production..." 22 75 14 \
|
|
263
|
-
"fast"
|
|
264
|
-
"standard" "create an ISO standard compression
|
|
265
|
-
"
|
|
266
|
-
"
|
|
252
|
+
"fast" "create an ISO fast compression" \
|
|
253
|
+
"standard" "create an ISO standard compression" \
|
|
254
|
+
"max" "create an ISO max compression" \
|
|
255
|
+
"clone" "create a live clone with user's data" \
|
|
256
|
+
"quit" "previous" 3>&2 2>&1 1>&3
|
|
267
257
|
)
|
|
268
258
|
|
|
269
259
|
case "$answer" in
|
|
@@ -273,75 +263,42 @@ function produce {
|
|
|
273
263
|
"standard")
|
|
274
264
|
standard ;;
|
|
275
265
|
|
|
276
|
-
"
|
|
277
|
-
|
|
266
|
+
"max")
|
|
267
|
+
max ;;
|
|
268
|
+
|
|
269
|
+
"clone")
|
|
270
|
+
clone;;
|
|
271
|
+
|
|
278
272
|
esac
|
|
279
273
|
}
|
|
280
274
|
|
|
281
275
|
################################
|
|
282
276
|
function fast {
|
|
283
|
-
sudo eggs produce --fast
|
|
277
|
+
sudo eggs produce --fast
|
|
284
278
|
}
|
|
285
279
|
|
|
286
280
|
################################
|
|
287
281
|
function standard {
|
|
288
|
-
sudo eggs produce
|
|
282
|
+
sudo eggs produce
|
|
289
283
|
}
|
|
290
284
|
|
|
291
285
|
################################
|
|
292
|
-
function
|
|
293
|
-
sudo eggs produce --
|
|
286
|
+
function max {
|
|
287
|
+
sudo eggs produce --max
|
|
294
288
|
}
|
|
295
289
|
|
|
296
290
|
################################
|
|
297
|
-
function
|
|
298
|
-
|
|
299
|
-
whiptail --title "remove" --menu "Remove prerequisites, eggs or purge..." 22 75 14 \
|
|
300
|
-
"all" "remove eggs, prerequisites and purge" \
|
|
301
|
-
"purge" "remove eggs and purge" \
|
|
302
|
-
"autoremove" "remove eggs and prerequisites" \
|
|
303
|
-
"quit" "previous" 3>&2 2>&1 1>&3
|
|
304
|
-
)
|
|
305
|
-
|
|
306
|
-
case "$answer" in
|
|
307
|
-
"all")
|
|
308
|
-
remove_all ;;
|
|
309
|
-
|
|
310
|
-
"autoremove")
|
|
311
|
-
remove_autoremove ;;
|
|
312
|
-
|
|
313
|
-
"purge")
|
|
314
|
-
remove_purge ;;
|
|
315
|
-
esac
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
################################
|
|
319
|
-
function remove_all {
|
|
320
|
-
sudo eggs remove --autoremove --purge
|
|
321
|
-
press_a_key_to_continue
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
################################
|
|
325
|
-
function remove_autoremove {
|
|
326
|
-
sudo eggs remove --autoremove
|
|
327
|
-
press_a_key_to_continue
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
################################
|
|
332
|
-
function remove_purge {
|
|
333
|
-
sudo eggs remove --purge
|
|
334
|
-
press_a_key_to_continue
|
|
291
|
+
function clone {
|
|
292
|
+
sudo eggs produce --fast --clone
|
|
335
293
|
}
|
|
336
294
|
|
|
337
295
|
################################
|
|
338
296
|
function tools {
|
|
339
297
|
answer=$(
|
|
340
298
|
whiptail --title "TOOLS" --menu "eggs companions tools" 22 75 14 \
|
|
341
|
-
"clean"
|
|
342
|
-
"
|
|
343
|
-
"
|
|
344
|
-
"yolk" "configure an internal apt repository in /var/local/yolk" \
|
|
299
|
+
"clean" "clean system logs, packages manager cache, etc" \
|
|
300
|
+
"skel" "update /etc/skel from current user" \
|
|
301
|
+
"yolk" "configure an internal apt repository in /var/local/yolk" \
|
|
345
302
|
"quit" "previous" 3>&2 2>&1 1>&3
|
|
346
303
|
)
|
|
347
304
|
|
|
@@ -349,9 +306,6 @@ function tools {
|
|
|
349
306
|
"clean")
|
|
350
307
|
tools_clean ;;
|
|
351
308
|
|
|
352
|
-
"locales")
|
|
353
|
-
tools_locales ;;
|
|
354
|
-
|
|
355
309
|
"skel")
|
|
356
310
|
tools_skel ;;
|
|
357
311
|
|
|
@@ -367,12 +321,6 @@ function tools_clean {
|
|
|
367
321
|
press_a_key_to_continue
|
|
368
322
|
}
|
|
369
323
|
|
|
370
|
-
################################
|
|
371
|
-
function tools_locales {
|
|
372
|
-
sudo eggs tools:locales
|
|
373
|
-
press_a_key_to_continue
|
|
374
|
-
}
|
|
375
|
-
|
|
376
324
|
################################
|
|
377
325
|
function tools_skel {
|
|
378
326
|
sudo eggs tools:skel
|
|
@@ -396,7 +344,6 @@ function wardrobe {
|
|
|
396
344
|
answer=$(
|
|
397
345
|
whiptail --title "TOOLS" --menu "eggs companions tools" 22 75 14 \
|
|
398
346
|
"get" "get warorobe" \
|
|
399
|
-
"ironing" "ironing costumes: sorting packages" \
|
|
400
347
|
"list" "list costumes" \
|
|
401
348
|
"show" "show costumes" \
|
|
402
349
|
"wear" "wear costume" \
|
|
@@ -407,9 +354,6 @@ function wardrobe {
|
|
|
407
354
|
"get")
|
|
408
355
|
wardrobe_get ;;
|
|
409
356
|
|
|
410
|
-
"ironing")
|
|
411
|
-
wardrobe_ironing ;;
|
|
412
|
-
|
|
413
357
|
"list")
|
|
414
358
|
wardrobe_list ;;
|
|
415
359
|
|
package/lib/commands/remove.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* penguins-eggs-v7 based on Debian live
|
|
3
|
-
* author: Piero Proietti
|
|
4
|
-
* email: piero.proietti@gmail.com
|
|
5
|
-
* license: MIT
|
|
6
|
-
*/
|
|
7
|
-
import { Command } from '@oclif/core';
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export default class Remove extends Command {
|
|
12
|
-
static description: string;
|
|
13
|
-
static examples: string[];
|
|
14
|
-
static flags: {
|
|
15
|
-
purge: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
-
autoremove: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
-
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
18
|
-
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
-
};
|
|
20
|
-
run(): Promise<void>;
|
|
21
|
-
}
|
package/lib/commands/remove.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
/**
|
|
5
|
-
* penguins-eggs-v7 based on Debian live
|
|
6
|
-
* author: Piero Proietti
|
|
7
|
-
* email: piero.proietti@gmail.com
|
|
8
|
-
* license: MIT
|
|
9
|
-
*/
|
|
10
|
-
const core_1 = require("@oclif/core");
|
|
11
|
-
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
12
|
-
const pacman_1 = tslib_1.__importDefault(require("../classes/pacman"));
|
|
13
|
-
const node_child_process_1 = require("node:child_process");
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
class Remove extends core_1.Command {
|
|
18
|
-
async run() {
|
|
19
|
-
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
20
|
-
const { flags } = await this.parse(Remove);
|
|
21
|
-
let verbose = false;
|
|
22
|
-
if (flags.verbose) {
|
|
23
|
-
verbose = true;
|
|
24
|
-
}
|
|
25
|
-
if (utils_1.default.isRoot()) {
|
|
26
|
-
/**
|
|
27
|
-
* debian package
|
|
28
|
-
*/
|
|
29
|
-
if (utils_1.default.isDebPackage() && (await utils_1.default.customConfirm())) {
|
|
30
|
-
/**
|
|
31
|
-
* in caso di autoremove, tolgo le dipendenze di versione PRIMA di eggs, altrimenti si inchioda
|
|
32
|
-
*/
|
|
33
|
-
if (flags.autoremove) {
|
|
34
|
-
/**
|
|
35
|
-
* Rimozione dipendenze da versione live-config / open-infrastructure-system-config (ubuntu bionic)
|
|
36
|
-
*/
|
|
37
|
-
if (pacman_1.default.packageIsInstalled('open-infrastructure-system-config')) {
|
|
38
|
-
(0, node_child_process_1.execSync)('apt-get purge open-infrastructure-system-config --yes');
|
|
39
|
-
}
|
|
40
|
-
else if (pacman_1.default.packageIsInstalled('live-config')) {
|
|
41
|
-
(0, node_child_process_1.execSync)('apt-get purge live-config --yes');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (flags.purge) {
|
|
45
|
-
(0, node_child_process_1.execSync)('apt-get purge eggs --yes');
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
(0, node_child_process_1.execSync)('apt-get remove eggs --yes');
|
|
49
|
-
}
|
|
50
|
-
if (flags.autoremove) {
|
|
51
|
-
(0, node_child_process_1.execSync)('apt-get autoremove --yes');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* sources
|
|
56
|
-
*/
|
|
57
|
-
if (utils_1.default.isSources() && (await utils_1.default.customConfirm())) {
|
|
58
|
-
if (flags.autoremove) {
|
|
59
|
-
// await Pacman.prerequisitesRemove()
|
|
60
|
-
}
|
|
61
|
-
if (flags.purge) {
|
|
62
|
-
await pacman_1.default.configurationRemove();
|
|
63
|
-
// eggs completion
|
|
64
|
-
(0, node_child_process_1.execSync)('rm -f /etc/bash_completion.d/eggs.bash');
|
|
65
|
-
// manpages
|
|
66
|
-
(0, node_child_process_1.execSync)('rm -f /usr/share/man/man1/eggs.1.gz');
|
|
67
|
-
}
|
|
68
|
-
utils_1.default.warning("You are using eggs as sources. I'll NOT remove it");
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
utils_1.default.useRoot(this.id);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.default = Remove;
|
|
77
|
-
Remove.description = 'remove eggs and others stuff';
|
|
78
|
-
Remove.examples = ['$ sudo eggs remove \nremove eggs\n', "$ sudo eggs remove --purge \nremove eggs, eggs configurations, configuration's files\n", '$ sudo eggs remove --autoremove \nremove eggs, eggs configurations, packages dependencies\n'];
|
|
79
|
-
Remove.flags = {
|
|
80
|
-
purge: core_1.Flags.boolean({ char: 'p', description: 'remove eggs configurations files' }),
|
|
81
|
-
autoremove: core_1.Flags.boolean({ char: 'a', description: 'remove eggs packages dependencies' }),
|
|
82
|
-
help: core_1.Flags.help({ char: 'h' }),
|
|
83
|
-
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
84
|
-
};
|