penguins-eggs 8.17.4 → 9.0.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.
Files changed (264) hide show
  1. package/README.md +235 -155
  2. package/addons/README.md +78 -84
  3. package/addons/{pve → blissos}/theme/applications/install-debian.desktop +0 -0
  4. package/addons/{pve → blissos}/theme/artwork/install-debian.png +0 -0
  5. package/addons/blissos/theme/calamares/branding/blissos-logo.png +0 -0
  6. package/addons/{pve → blissos}/theme/calamares/branding/branding.desc +0 -0
  7. package/addons/blissos/theme/calamares/branding/languages.png +0 -0
  8. package/addons/blissos/theme/calamares/branding/show.qml +75 -0
  9. package/addons/blissos/theme/calamares/branding/slide1.png +0 -0
  10. package/addons/blissos/theme/calamares/branding/slide2.png +0 -0
  11. package/addons/blissos/theme/calamares/branding/slide3.png +0 -0
  12. package/addons/blissos/theme/calamares/branding/welcome.png +0 -0
  13. package/addons/{pve → blissos}/theme/calamares/modules/partition.yml +2 -2
  14. package/addons/blissos/theme/livecd/README.md +23 -0
  15. package/addons/blissos/theme/livecd/grub.template.cfg +34 -0
  16. package/addons/blissos/theme/livecd/grub.theme.cfg +46 -0
  17. package/addons/blissos/theme/livecd/isolinux.template.cfg +29 -0
  18. package/addons/blissos/theme/livecd/isolinux.theme.cfg +45 -0
  19. package/addons/blissos/theme/livecd/splash.png +0 -0
  20. package/addons/debian/theme/README.md +23 -0
  21. package/addons/debian/theme/{branding → calamares/branding}/branding.desc +0 -0
  22. package/addons/debian/theme/{branding → calamares/branding}/debian-logo.png +0 -0
  23. package/addons/debian/theme/{branding → calamares/branding}/show.qml +0 -0
  24. package/addons/debian/theme/{branding → calamares/branding}/slide1.png +0 -0
  25. package/addons/debian/theme/{branding → calamares/branding}/welcome.png +0 -0
  26. package/addons/debian/theme/calamares/modules/partition.yml +233 -0
  27. package/addons/debian/theme/livecd/README.md +23 -0
  28. package/addons/debian/theme/livecd/grub.template.cfg +34 -0
  29. package/addons/{pve/theme/livecd/theme.cfg → debian/theme/livecd/grub.theme.cfg} +4 -0
  30. package/addons/debian/theme/livecd/isolinux.template.cfg +30 -0
  31. package/{conf/distros/buster/isolinux/stdmenu.template.cfg → addons/debian/theme/livecd/isolinux.theme.cfg} +4 -0
  32. package/addons/debian/theme/livecd/splash.png +0 -0
  33. package/addons/deblinux/theme/README.md +19 -12
  34. package/addons/eggs/adapt/applications/eggs-adapt.desktop +1 -1
  35. package/addons/eggs/theme/livecd/README.md +21 -6
  36. package/addons/eggs/theme/livecd/grub.template.cfg +11 -37
  37. package/addons/eggs/theme/livecd/{theme.cfg → grub.theme.cfg} +5 -1
  38. package/addons/eggs/theme/livecd/isolinux.template.cfg +29 -0
  39. package/addons/eggs/theme/livecd/isolinux.theme.cfg +46 -0
  40. package/addons/eggs/theme/livecd/splash.png +0 -0
  41. package/addons/guadalinex/theme/livecd/README.md +23 -0
  42. package/addons/guadalinex/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +12 -3
  43. package/addons/guadalinex/theme/livecd/{theme.cfg → isolinux.theme.cfg} +0 -0
  44. package/addons/neon/theme/livecd/README.md +23 -0
  45. package/addons/neon/theme/livecd/grub.template.cfg +34 -0
  46. package/addons/{ufficiozero/theme/livecd/theme.cfg → neon/theme/livecd/grub.theme.cfg} +5 -1
  47. package/addons/neon/theme/livecd/isolinux.template.cfg +29 -0
  48. package/addons/neon/theme/livecd/isolinux.theme.cfg +46 -0
  49. package/addons/neon/theme/livecd/splash.pcx +0 -0
  50. package/addons/neon/theme/livecd/splash.png +0 -0
  51. package/addons/openos/theme/livecd/README.md +23 -0
  52. package/addons/openos/theme/livecd/{theme.cfg → grub.theme.cfg} +0 -0
  53. package/addons/openos/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +11 -3
  54. package/addons/openos/theme/livecd/isolinux.theme.cfg +45 -0
  55. package/addons/ufficiozero/theme/applications/install-debian.desktop +17 -2
  56. package/bin/dev +17 -0
  57. package/bin/dev.cmd +3 -0
  58. package/bin/run +2 -4
  59. package/conf/distros/bionic/calamares/settings.yml +5 -5
  60. package/conf/distros/bookworm/README.md +9 -0
  61. package/conf/distros/bullseye/README.md +6 -8
  62. package/conf/distros/buster/calamares/modules/shellprocess_eggs-cleanup.yml +6 -0
  63. package/conf/distros/buster/calamares/settings.yml +14 -3
  64. package/conf/distros/chimaera/README.md +3 -0
  65. package/conf/distros/daedalus/README.md +3 -0
  66. package/conf/distros/focal/calamares/settings.yml +2 -2
  67. package/conf/distros/jammy/README.md +9 -0
  68. package/conf/distros/rolling/README.md +3 -0
  69. package/conf/distros/rolling/calamares/calamares-modules/remove-link/module.yml +9 -0
  70. package/conf/distros/rolling/calamares/calamares-modules/remove-link/remove-link.sh +3 -0
  71. package/conf/distros/rolling/calamares/modules/displaymanager.yml +22 -0
  72. package/conf/distros/rolling/calamares/modules/finished.yml +6 -0
  73. package/conf/distros/rolling/calamares/modules/fstab.yml +13 -0
  74. package/conf/distros/rolling/calamares/modules/locale.yml +97 -0
  75. package/conf/distros/rolling/calamares/modules/luksopenswaphookcfg.yml +6 -0
  76. package/conf/distros/rolling/calamares/modules/mount.yml +38 -0
  77. package/conf/distros/rolling/calamares/modules/packages.yml +8 -0
  78. package/conf/distros/rolling/calamares/modules/removeuser.yml +15 -0
  79. package/conf/distros/rolling/calamares/modules/unpackfs.yml +7 -0
  80. package/conf/distros/rolling/calamares/modules/users.yml +20 -0
  81. package/conf/distros/rolling/calamares/modules/welcome.yml +19 -0
  82. package/conf/distros/{bullseye → rolling}/calamares/settings.yml +17 -12
  83. package/conf/distros/thirtyfive/README.md +3 -0
  84. package/conf/distros/tumbleweed/README.md +3 -0
  85. package/conf/eggs.yaml +1 -1
  86. package/conf/exclude.list +2 -4
  87. package/conf/tools.yaml +1 -1
  88. package/lib/classes/basket.js +24 -28
  89. package/lib/classes/bleach.js +17 -17
  90. package/lib/classes/compressors.js +15 -14
  91. package/lib/classes/daddy.js +38 -31
  92. package/lib/classes/distro.d.ts +3 -2
  93. package/lib/classes/distro.js +288 -179
  94. package/lib/classes/family/archlinux.d.ts +69 -0
  95. package/lib/classes/family/archlinux.js +181 -0
  96. package/lib/classes/family/debian.d.ts +64 -0
  97. package/lib/classes/family/debian.js +227 -0
  98. package/lib/classes/family/fedora.d.ts +63 -0
  99. package/lib/classes/family/fedora.js +169 -0
  100. package/lib/classes/family/suse.d.ts +63 -0
  101. package/lib/classes/family/suse.js +169 -0
  102. package/lib/classes/i18n.js +16 -16
  103. package/lib/classes/incubation/branding.js +5 -4
  104. package/lib/classes/incubation/distros/bionic.js +1 -2
  105. package/lib/classes/incubation/distros/buster.js +2 -2
  106. package/lib/classes/incubation/distros/focal.js +3 -2
  107. package/lib/classes/incubation/distros/jessie.js +1 -25
  108. package/lib/classes/incubation/distros/{bullseye.d.ts → rolling.d.ts} +3 -3
  109. package/lib/classes/incubation/distros/{bullseye.js → rolling.js} +15 -16
  110. package/lib/classes/incubation/fisherman-helper/displaymanager.js +2 -7
  111. package/lib/classes/incubation/fisherman-helper/packages.js +31 -32
  112. package/lib/classes/incubation/fisherman.d.ts +17 -17
  113. package/lib/classes/incubation/fisherman.js +84 -71
  114. package/lib/classes/incubation/incubator.js +116 -78
  115. package/lib/classes/incubation/installer.d.ts +2 -2
  116. package/lib/classes/incubation/installer.js +6 -20
  117. package/lib/classes/initrd.d.ts +1 -1
  118. package/lib/classes/initrd.js +37 -30
  119. package/lib/classes/krill_install.js +135 -132
  120. package/lib/classes/krill_prepare.js +51 -51
  121. package/lib/classes/n8.js +6 -11
  122. package/lib/classes/ovary.d.ts +29 -11
  123. package/lib/classes/ovary.js +711 -605
  124. package/lib/classes/pacman.d.ts +53 -58
  125. package/lib/classes/pacman.js +512 -431
  126. package/lib/classes/pve-live.js +6 -6
  127. package/lib/classes/settings.js +46 -55
  128. package/lib/classes/systemctl.d.ts +6 -6
  129. package/lib/classes/systemctl.js +7 -7
  130. package/lib/classes/tools.d.ts +1 -1
  131. package/lib/classes/tools.js +10 -10
  132. package/lib/classes/utils.d.ts +9 -12
  133. package/lib/classes/utils.js +127 -106
  134. package/lib/classes/xdg.js +94 -90
  135. package/lib/classes/yolk.js +36 -29
  136. package/lib/commands/adapt.d.ts +3 -3
  137. package/lib/commands/adapt.js +12 -12
  138. package/lib/commands/bro.d.ts +14 -0
  139. package/lib/commands/bro.js +31 -0
  140. package/lib/commands/calamares.d.ts +7 -7
  141. package/lib/commands/calamares.js +21 -46
  142. package/lib/commands/config.d.ts +5 -5
  143. package/lib/commands/config.js +68 -75
  144. package/lib/commands/dad.d.ts +5 -5
  145. package/lib/commands/dad.js +11 -11
  146. package/lib/commands/export/deb.d.ts +8 -8
  147. package/lib/commands/export/deb.js +16 -16
  148. package/lib/commands/export/docs.d.ts +2 -2
  149. package/lib/commands/export/docs.js +9 -9
  150. package/lib/commands/export/iso.d.ts +4 -4
  151. package/lib/commands/export/iso.js +12 -17
  152. package/lib/commands/info.d.ts +9 -3
  153. package/lib/commands/info.js +14 -164
  154. package/lib/commands/install.d.ts +4 -4
  155. package/lib/commands/install.js +19 -14
  156. package/lib/commands/kill.d.ts +3 -3
  157. package/lib/commands/kill.js +11 -13
  158. package/lib/commands/mom.d.ts +2 -2
  159. package/lib/commands/mom.js +8 -8
  160. package/lib/commands/produce.d.ts +14 -14
  161. package/lib/commands/produce.js +42 -45
  162. package/lib/commands/remove.d.ts +5 -5
  163. package/lib/commands/remove.js +46 -57
  164. package/lib/commands/tools/clean.d.ts +3 -3
  165. package/lib/commands/tools/clean.js +10 -12
  166. package/lib/commands/tools/locales.d.ts +4 -4
  167. package/lib/commands/tools/locales.js +8 -8
  168. package/lib/commands/tools/skel.d.ts +4 -4
  169. package/lib/commands/tools/skel.js +10 -15
  170. package/lib/commands/tools/stat.d.ts +7 -4
  171. package/lib/commands/tools/stat.js +20 -13
  172. package/lib/commands/tools/yolk.d.ts +3 -3
  173. package/lib/commands/tools/yolk.js +12 -12
  174. package/lib/commands/update.d.ts +5 -10
  175. package/lib/commands/update.js +56 -72
  176. package/lib/components/elements/information.d.ts +4 -0
  177. package/lib/components/elements/information.js +166 -0
  178. package/lib/components/elements/steps.js +1 -1
  179. package/lib/components/elements/title.js +7 -10
  180. package/lib/components/finished.js +5 -5
  181. package/lib/components/install.js +5 -5
  182. package/lib/components/keyboard.js +5 -5
  183. package/lib/components/location.js +5 -5
  184. package/lib/components/network.js +5 -5
  185. package/lib/components/partitions.js +5 -5
  186. package/lib/components/summary.js +5 -5
  187. package/lib/components/users.js +6 -6
  188. package/lib/components/welcome.js +6 -6
  189. package/lib/index.d.ts +1 -1
  190. package/lib/index.js +2 -2
  191. package/lib/interfaces/i-distro.d.ts +3 -2
  192. package/lib/interfaces/i-settings.d.ts +2 -2
  193. package/lib/lib/cli-autologin.d.ts +19 -2
  194. package/lib/lib/cli-autologin.js +114 -39
  195. package/lib/lib/dependencies.d.ts +9 -6
  196. package/lib/lib/dependencies.js +22 -13
  197. package/lib/lib/get_address.js +2 -2
  198. package/lib/lib/get_dns.js +2 -2
  199. package/lib/lib/get_domain.js +2 -2
  200. package/lib/lib/get_gateway.js +2 -2
  201. package/lib/lib/get_hostname.js +2 -2
  202. package/lib/lib/get_netmask.js +2 -2
  203. package/lib/lib/get_password.js +2 -2
  204. package/lib/lib/get_root_password.js +2 -2
  205. package/lib/lib/get_userfullname.js +2 -2
  206. package/lib/lib/get_username.js +2 -2
  207. package/lib/lib/select_address_type.js +2 -5
  208. package/lib/lib/select_filesystem_type.js +5 -14
  209. package/lib/lib/select_installation_device.js +3 -3
  210. package/lib/lib/select_interface.js +1 -1
  211. package/lib/lib/select_keyboard_layout.js +2 -10
  212. package/lib/lib/select_languages.js +2 -2
  213. package/lib/lib/select_regions.js +1 -12
  214. package/lib/lib/select_user_swap_choice.js +4 -4
  215. package/lib/lib/select_zones.js +483 -62
  216. package/oclif.manifest.json +1 -1
  217. package/package.json +115 -107
  218. package/scripts/bros/waydroid-helper.sh +92 -0
  219. package/scripts/eggs.bash +65 -35
  220. package/scripts/not-used/eggs-cleanup.sh +7 -0
  221. package/scripts/{install-eggs-ppa.sh → not-used/install-eggs-ppa.sh} +0 -0
  222. package/scripts/{mkinitramfs → not-used/mkinitramfs} +0 -0
  223. package/scripts/{pve-live.sh → not-used/pve-live.sh} +0 -0
  224. package/addons/eggs/theme/livecd/menu.template.cfg +0 -54
  225. package/addons/pve/theme/applications/penguins-pve.desktop +0 -24
  226. package/addons/pve/theme/calamares/branding/pve-logo.png +0 -0
  227. package/addons/pve/theme/calamares/branding/show.qml +0 -227
  228. package/addons/pve/theme/calamares/branding/slide1.png +0 -0
  229. package/addons/pve/theme/calamares/branding/slide2.png +0 -0
  230. package/addons/pve/theme/calamares/branding/slide3.png +0 -0
  231. package/addons/pve/theme/calamares/branding/slide4.png +0 -0
  232. package/addons/pve/theme/calamares/branding/slide5.png +0 -0
  233. package/addons/pve/theme/calamares/branding/slide6.png +0 -0
  234. package/addons/pve/theme/calamares/branding/slide7.png +0 -0
  235. package/addons/pve/theme/calamares/branding/slide8.png +0 -0
  236. package/addons/pve/theme/calamares/branding/slide9.png +0 -0
  237. package/addons/pve/theme/calamares/branding/welcome.png +0 -0
  238. package/addons/pve/theme/livecd/README.md +0 -8
  239. package/addons/pve/theme/livecd/grub.template.cfg +0 -60
  240. package/addons/pve/theme/livecd/menu.template.cfg +0 -54
  241. package/addons/pve/theme/livecd/splash.png +0 -0
  242. package/addons/ufficiozero/theme/artwork/install-debian.png +0 -0
  243. package/addons/ufficiozero/theme/livecd/README.md +0 -8
  244. package/addons/ufficiozero/theme/livecd/grub.template.cfg +0 -60
  245. package/addons/ufficiozero/theme/livecd/menu.template.cfg +0 -54
  246. package/changelog.md +0 -154
  247. package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/bootloader-config.sh +0 -28
  248. package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/module.yml +0 -8
  249. package/conf/distros/buster/grub/grub.template.cfg +0 -58
  250. package/conf/distros/buster/grub/loopback.cfg +0 -1
  251. package/conf/distros/buster/grub/theme.cfg +0 -42
  252. package/conf/distros/buster/isolinux/isolinux.template.cfg +0 -8
  253. package/conf/distros/buster/isolinux/menu.template.cfg +0 -56
  254. package/conf/distros/focal/grub/grub.template.cfg +0 -67
  255. package/conf/distros/focal/isolinux/menu.template.cfg +0 -54
  256. package/lib/classes/incubation/distros/beowulf.d.ts +0 -30
  257. package/lib/classes/incubation/distros/beowulf.js +0 -69
  258. package/lib/classes/krill_install_compare.d.ts +0 -200
  259. package/lib/classes/krill_install_compare.js +0 -1110
  260. package/manpages/doc/man/eggs.1.gz +0 -0
  261. package/scripts/python-minimal-deb/anti-python-minimal +0 -7
  262. package/scripts/python-minimal-deb/python-minimal_99_all.deb +0 -0
  263. package/scripts/python-minimal-deb/python-minimal_99_amd64.buildinfo +0 -168
  264. package/scripts/python-minimal-deb/python-minimal_99_amd64.changes +0 -25
@@ -1,19 +1,19 @@
1
1
  /**
2
- * penguins-eggs: fisherman.ts
3
- *
4
- * author: Piero Proietti
5
- * mail: piero.proietti@gmail.com
6
- */
2
+ * penguins-eggs: fisherman.ts
3
+ *
4
+ * author: Piero Proietti
5
+ * mail: piero.proietti@gmail.com
6
+ */
7
7
  import { IDistro } from '../../interfaces';
8
- import { IInstaller } from '../../interfaces/index';
8
+ import { IInstaller } from '../../interfaces';
9
9
  export default class Fisherman {
10
10
  installer: IInstaller;
11
11
  distro: IDistro;
12
12
  verbose: boolean;
13
13
  constructor(distro: IDistro, installer: IInstaller, verbose?: boolean);
14
14
  /**
15
- * write setting
16
- */
15
+ * write setting
16
+ */
17
17
  settings(branding?: string): Promise<void>;
18
18
  /**
19
19
  *
@@ -21,9 +21,9 @@ export default class Fisherman {
21
21
  */
22
22
  shellprocess(name: string): Promise<void>;
23
23
  /**
24
- *
25
- * @param name
26
- */
24
+ *
25
+ * @param name
26
+ */
27
27
  contextualprocess(name: string): Promise<void>;
28
28
  /**
29
29
  *
@@ -50,13 +50,13 @@ export default class Fisherman {
50
50
  */
51
51
  show(name: string, type: string, path: string): void;
52
52
  /**
53
- * ====================================================================================
54
- * M O D U L E S
55
- * ====================================================================================
56
- */
53
+ * ====================================================================================
54
+ * M O D U L E S
55
+ * ====================================================================================
56
+ */
57
57
  /**
58
- * Al momento rimane con la vecchia configurazione
59
- */
58
+ * Al momento rimane con la vecchia configurazione
59
+ */
60
60
  moduleFinished(): Promise<void>;
61
61
  /**
62
62
  * Al momento rimane con la vecchia configurazione
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
  /**
3
- * penguins-eggs: fisherman.ts
4
- *
5
- * author: Piero Proietti
6
- * mail: piero.proietti@gmail.com
7
- */
3
+ * penguins-eggs: fisherman.ts
4
+ *
5
+ * author: Piero Proietti
6
+ * mail: piero.proietti@gmail.com
7
+ */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
- const fs = require("fs");
11
- const shx = require("shelljs");
12
- const path = require("path");
13
- const chalk = require("chalk");
14
- const utils_1 = tslib_1.__importDefault(require("../utils"));
15
- const exec = require('../../lib/utils').exec;
10
+ const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
11
+ const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
12
+ const node_path_1 = (0, tslib_1.__importDefault)(require("node:path"));
13
+ const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
14
+ const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
15
+ const displaymanager_1 = require("./fisherman-helper/displaymanager");
16
+ const utils_2 = require("../../lib/utils");
16
17
  class Fisherman {
17
18
  constructor(distro, installer, verbose = false) {
18
19
  this.installer = {};
@@ -22,45 +23,50 @@ class Fisherman {
22
23
  this.verbose = verbose;
23
24
  }
24
25
  /**
25
- * write setting
26
- */
26
+ * write setting
27
+ */
27
28
  async settings(branding = 'eggs') {
28
- let settings = this.installer.configuration + 'settings.conf';
29
- shx.cp(this.installer.template + 'settings.yml', settings);
30
- let s = '# ';
29
+ const settings = this.installer.configuration + 'settings.conf';
30
+ shelljs_1.default.cp(this.installer.template + 'settings.yml', settings);
31
+ let hasSystemd = '# ';
31
32
  if (utils_1.default.isSystemd()) {
32
- s = '- ';
33
+ hasSystemd = '- ';
34
+ }
35
+ let hasDisplaymanager = '# ';
36
+ if ((0, displaymanager_1.displaymanager)() !== '') {
37
+ hasDisplaymanager = '- ';
33
38
  }
34
- shx.sed('-i', '{{s}}', s, settings);
35
- shx.sed('-i', '{{branding}}', branding, settings);
39
+ shelljs_1.default.sed('-i', '{{hasSystemd}}', hasSystemd, settings);
40
+ shelljs_1.default.sed('-i', '{{hasDisplaymanager}}', hasDisplaymanager, settings);
41
+ shelljs_1.default.sed('-i', '{{branding}}', branding, settings);
36
42
  }
37
43
  /**
38
44
  *
39
45
  * @param name
40
46
  */
41
47
  async shellprocess(name) {
42
- const moduleSource = path.resolve(__dirname, this.installer.templateModules + 'shellprocess_' + name + '.yml');
48
+ const moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateModules + 'shellprocess_' + name + '.yml');
43
49
  const moduleDest = this.installer.modules + 'shellprocess_' + name + '.conf';
44
- if (fs.existsSync(moduleSource)) {
50
+ if (node_fs_1.default.existsSync(moduleSource)) {
45
51
  if (this.verbose)
46
52
  this.show(name, 'shellprocess', moduleDest);
47
- shx.cp(moduleSource, moduleDest);
53
+ shelljs_1.default.cp(moduleSource, moduleDest);
48
54
  }
49
55
  else if (this.verbose) {
50
56
  console.log(`calamares: ${name} shellprocess, nothing to do`);
51
57
  }
52
58
  }
53
59
  /**
54
- *
55
- * @param name
56
- */
60
+ *
61
+ * @param name
62
+ */
57
63
  async contextualprocess(name) {
58
- const moduleSource = path.resolve(__dirname, this.installer.templateModules + name + '_context.yml');
64
+ const moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateModules + name + '_context.yml');
59
65
  const moduleDest = this.installer.modules + name + '_context.conf';
60
- if (fs.existsSync(moduleSource)) {
66
+ if (node_fs_1.default.existsSync(moduleSource)) {
61
67
  if (this.verbose)
62
68
  this.show(name, 'contextualprocess', moduleDest);
63
- shx.cp(moduleSource, moduleDest);
69
+ shelljs_1.default.cp(moduleSource, moduleDest);
64
70
  }
65
71
  else if (this.verbose) {
66
72
  console.log(`calamares: ${name} contextualprocess, nothing to do!`);
@@ -72,7 +78,7 @@ class Fisherman {
72
78
  * @param replaces [['search','replace']]
73
79
  */
74
80
  async buildModule(name, vendor = '') {
75
- let moduleSource = path.resolve(__dirname, this.installer.templateModules + name + '.yml');
81
+ let moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateModules + name + '.yml');
76
82
  /**
77
83
  * We need vendor here to have possibility to load custom modules for calamares
78
84
  * the custom modules live in: /addons/vendor/theme/calamares/modules
@@ -90,19 +96,19 @@ class Fisherman {
90
96
  *
91
97
  */
92
98
  if (vendor !== '') {
93
- const customModuleSource = path.resolve(__dirname, `../../../addons/${vendor}/theme/calamares/modules/${name}.yml`);
94
- if (fs.existsSync(customModuleSource)) {
99
+ const customModuleSource = node_path_1.default.resolve(__dirname, `../../../addons/${vendor}/theme/calamares/modules/${name}.yml`);
100
+ if (node_fs_1.default.existsSync(customModuleSource)) {
95
101
  moduleSource = customModuleSource;
96
102
  }
97
103
  }
98
104
  const moduleDest = this.installer.modules + name + '.conf';
99
- if (fs.existsSync(moduleSource)) {
105
+ if (node_fs_1.default.existsSync(moduleSource)) {
100
106
  if (this.verbose)
101
107
  this.show(name, 'module', moduleDest);
102
- shx.cp(moduleSource, moduleDest);
108
+ shelljs_1.default.cp(moduleSource, moduleDest);
103
109
  }
104
110
  else if (this.verbose) {
105
- console.log('unchanged: ' + chalk.greenBright(name));
111
+ console.log('unchanged: ' + chalk_1.default.greenBright(name));
106
112
  }
107
113
  }
108
114
  /**
@@ -111,7 +117,7 @@ class Fisherman {
111
117
  * @param isScript
112
118
  */
113
119
  async buildCalamaresModule(name, isScript = true) {
114
- const moduleTemplate = path.resolve(__dirname, this.installer.templateMultiarch + name);
120
+ const moduleTemplate = node_path_1.default.resolve(__dirname, this.installer.templateMultiarch + name);
115
121
  const moduleDest = this.installer.multiarchModules + name;
116
122
  const moduleScript = `/usr/sbin/${name}.sh`;
117
123
  // console.log('moduleDest: ' + moduleDest)
@@ -119,13 +125,13 @@ class Fisherman {
119
125
  // console.log('moduleScript: ' + moduleScript)
120
126
  if (this.verbose)
121
127
  this.show(name, 'module', moduleDest);
122
- if (!fs.existsSync(moduleDest)) {
123
- fs.mkdirSync(moduleDest);
128
+ if (!node_fs_1.default.existsSync(moduleDest)) {
129
+ node_fs_1.default.mkdirSync(moduleDest);
124
130
  }
125
- shx.cp(`${moduleTemplate}/module.yml`, `${moduleDest}/module.desc`);
131
+ shelljs_1.default.cp(`${moduleTemplate}/module.yml`, `${moduleDest}/module.desc`);
126
132
  if (isScript) {
127
- shx.cp(`${moduleTemplate}/${name}.sh`, moduleScript);
128
- await exec(`chmod +x ${moduleScript}`);
133
+ shelljs_1.default.cp(`${moduleTemplate}/${name}.sh`, moduleScript);
134
+ await (0, utils_2.exec)(`chmod +x ${moduleScript}`);
129
135
  }
130
136
  return moduleScript;
131
137
  }
@@ -134,17 +140,17 @@ class Fisherman {
134
140
  * @param name
135
141
  */
136
142
  async buildCalamaresPy(name) {
137
- const moduleSource = path.resolve(__dirname, this.installer.templateMultiarch + '/' + name);
143
+ const moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateMultiarch + '/' + name);
138
144
  const moduleDest = this.installer.multiarchModules + name;
139
145
  if (this.verbose)
140
146
  this.show(name, 'python', moduleDest);
141
- if (!fs.existsSync(moduleDest)) {
142
- fs.mkdirSync(moduleDest);
147
+ if (!node_fs_1.default.existsSync(moduleDest)) {
148
+ node_fs_1.default.mkdirSync(moduleDest);
143
149
  }
144
- shx.cp(`${moduleSource}/module.yml`, `${moduleDest}/module.desc`);
145
- shx.cp(`${moduleSource}/${name}.yml`, `${moduleDest}/${name}.conf`);
146
- shx.cp(`${moduleSource}/main.py`, moduleDest);
147
- await exec(`chmod +x ${moduleSource}/main.py`);
150
+ shelljs_1.default.cp(`${moduleSource}/module.yml`, `${moduleDest}/module.desc`);
151
+ shelljs_1.default.cp(`${moduleSource}/${name}.yml`, `${moduleDest}/${name}.conf`);
152
+ shelljs_1.default.cp(`${moduleSource}/main.py`, moduleDest);
153
+ await (0, utils_2.exec)(`chmod +x ${moduleSource}/main.py`);
148
154
  }
149
155
  /**
150
156
  *
@@ -153,32 +159,39 @@ class Fisherman {
153
159
  * @param path
154
160
  */
155
161
  show(name, type, path) {
156
- if (type === 'module') {
157
- console.log('fisherman: ' + chalk.yellow(name) + ' module in ' + chalk.yellow(path));
158
- }
159
- else if (type === 'calamares_module') {
160
- console.log('fisherman: ' + chalk.cyanBright(name) + ' calamares_module in ' + chalk.cyanBright(path));
161
- }
162
- else if (type === 'shellprocess') {
163
- console.log('fisherman: ' + chalk.green(name) + ' shellprocess in ' + chalk.green(path));
164
- }
165
- else if (type === 'contextualprocess') {
166
- console.log('fisherman: ' + chalk.cyanBright(name) + ' shellprocess in ' + chalk.cyanBright(path));
162
+ switch (type) {
163
+ case 'module': {
164
+ console.log('fisherman: ' + chalk_1.default.yellow(name) + ' module in ' + chalk_1.default.yellow(path));
165
+ break;
166
+ }
167
+ case 'calamares_module': {
168
+ console.log('fisherman: ' + chalk_1.default.cyanBright(name) + ' calamares_module in ' + chalk_1.default.cyanBright(path));
169
+ break;
170
+ }
171
+ case 'shellprocess': {
172
+ console.log('fisherman: ' + chalk_1.default.green(name) + ' shellprocess in ' + chalk_1.default.green(path));
173
+ break;
174
+ }
175
+ case 'contextualprocess': {
176
+ console.log('fisherman: ' + chalk_1.default.cyanBright(name) + ' shellprocess in ' + chalk_1.default.cyanBright(path));
177
+ break;
178
+ }
179
+ // No default
167
180
  }
168
181
  }
169
182
  /**
170
- * ====================================================================================
171
- * M O D U L E S
172
- * ====================================================================================
173
- */
183
+ * ====================================================================================
184
+ * M O D U L E S
185
+ * ====================================================================================
186
+ */
174
187
  /**
175
- * Al momento rimane con la vecchia configurazione
176
- */
188
+ * Al momento rimane con la vecchia configurazione
189
+ */
177
190
  async moduleFinished() {
178
191
  const name = 'finished';
179
192
  await this.buildModule(name);
180
193
  const restartNowCommand = 'reboot';
181
- shx.sed('-i', '{{restartNowCommand}}', restartNowCommand, this.installer.modules + name + '.conf');
194
+ shelljs_1.default.sed('-i', '{{restartNowCommand}}', restartNowCommand, this.installer.modules + name + '.conf');
182
195
  }
183
196
  /**
184
197
  * Al momento rimane con la vecchia configurazione
@@ -186,7 +199,7 @@ class Fisherman {
186
199
  async moduleUnpackfs() {
187
200
  const name = 'unpackfs';
188
201
  this.buildModule(name);
189
- shx.sed('-i', '{{source}}', this.distro.mountpointSquashFs, this.installer.modules + name + '.conf');
202
+ shelljs_1.default.sed('-i', '{{source}}', this.distro.mountpointSquashFs, this.installer.modules + name + '.conf');
190
203
  }
191
204
  /**
192
205
  * usa i moduli-ts
@@ -195,7 +208,7 @@ class Fisherman {
195
208
  const name = 'displaymanager';
196
209
  const displaymanager = require('./fisherman-helper/displaymanager').displaymanager;
197
210
  this.buildModule(name);
198
- shx.sed('-i', '{{displaymanagers}}', displaymanager(), this.installer.modules + name + '.conf');
211
+ shelljs_1.default.sed('-i', '{{displaymanagers}}', displaymanager(), this.installer.modules + name + '.conf');
199
212
  }
200
213
  /**
201
214
  * usa i moduli-ts
@@ -206,12 +219,12 @@ class Fisherman {
206
219
  const tryInstall = require('./fisherman-helper/packages').tryInstall;
207
220
  this.buildModule(name);
208
221
  if (remove) {
209
- shx.sed('-i', '{{remove}}', removePackages(distro), this.installer.modules + name + '.conf');
222
+ shelljs_1.default.sed('-i', '{{remove}}', removePackages(distro), this.installer.modules + name + '.conf');
210
223
  }
211
224
  else {
212
- shx.sed('-i', '{{remove}}', '', this.installer.modules + name + '.conf');
225
+ shelljs_1.default.sed('-i', '{{remove}}', '', this.installer.modules + name + '.conf');
213
226
  }
214
- shx.sed('-i', '{{try_install}}', tryInstall(distro), this.installer.modules + name + '.conf');
227
+ shelljs_1.default.sed('-i', '{{try_install}}', tryInstall(distro), this.installer.modules + name + '.conf');
215
228
  }
216
229
  /**
217
230
  * Al momento rimane con la vecchia configurazione
@@ -219,7 +232,7 @@ class Fisherman {
219
232
  async moduleRemoveuser(username) {
220
233
  const name = 'removeuser';
221
234
  this.buildModule(name);
222
- shx.sed('-i', '{{username}}', username, this.installer.modules + name + '.conf');
235
+ shelljs_1.default.sed('-i', '{{username}}', username, this.installer.modules + name + '.conf');
223
236
  }
224
237
  }
225
238
  exports.default = Fisherman;