penguins-eggs 25.9.3 → 25.9.7

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.
@@ -53,20 +53,16 @@ export default class Update extends Command {
53
53
  const choose = await this.choosePkg();
54
54
  Utils.titles(`updating via ${choose}`);
55
55
  switch (choose) {
56
- case 'repos': {
57
- await this.getPkgFromRepo();
58
- break;
59
- }
60
- case 'lan': {
56
+ case 'LAN': {
61
57
  await this.getPkgFromLan();
62
58
  break;
63
59
  }
64
- case 'sourceforge': {
65
- this.getPkgFromSourceforge();
60
+ case 'Package_Manager': {
61
+ await this.getPkgFromPackageManager();
66
62
  break;
67
63
  }
68
- case 'sources': {
69
- this.getFromSources();
64
+ case 'Source': {
65
+ this.getFromSource();
70
66
  break;
71
67
  }
72
68
  // No default
@@ -76,18 +72,18 @@ export default class Update extends Command {
76
72
  *
77
73
  */
78
74
  async choosePkg() {
79
- const choices = ['abort'];
80
- choices.push('lan', 'repos', 'sourceforge', 'sources');
75
+ const choices = ['Abort'];
76
+ choices.push('LAN', 'Source', 'Package_Manager');
81
77
  const questions = [
82
78
  {
83
79
  choices,
84
- message: 'select update method',
80
+ message: 'Select update method',
85
81
  name: 'selected',
86
82
  type: 'list'
87
83
  }
88
84
  ];
89
85
  const answer = await inquirer.prompt(questions);
90
- if (answer.selected === 'abort') {
86
+ if (answer.selected === 'Abort') {
91
87
  process.exit(0);
92
88
  }
93
89
  return answer.selected;
@@ -95,19 +91,31 @@ export default class Update extends Command {
95
91
  /**
96
92
  *
97
93
  */
98
- async getPkgFromRepo() {
94
+ async getPkgFromPackageManager() {
99
95
  let cmd = "";
100
- if (this.distro.familyId === "debian") {
101
- cmd = 'apt install penguins-eggs';
96
+ if (this.distro.familyId === 'alpine') {
97
+ cmd = `doas apk add penguins-egga`;
102
98
  }
103
99
  else if (this.distro.familyId === 'archlinux') {
104
- cmd = 'pacman -S penguins-eggs';
100
+ cmd = 'sudo pacman -S penguins-eggs';
101
+ }
102
+ else if (this.distro.familyId === "debian") {
103
+ cmd = 'sudo apt install penguins-eggs';
105
104
  }
106
- else if (this.distro.familyId === 'alpine') {
107
- cmd = `apk add penguins-egga`;
105
+ else if (this.distro.familyId === "fedora") {
106
+ cmd = 'sudo dnf install penguins-eggs\nsudo dnf install penguins-eggs';
108
107
  }
108
+ else if (this.distro.familyId === "openmamba") {
109
+ cmd = 'sudo dnf install penguins-eggs\nsudo dnf install penguins-eggs';
110
+ }
111
+ else if (this.distro.familyId === "opensuse") {
112
+ cmd = 'sudo zypper install penguins-eggs';
113
+ }
114
+ Utils.titles(`update`);
115
+ Utils.warning(`To update/install penguins-eggs cut and copy follow commands`);
116
+ console.log();
109
117
  console.log(cmd);
110
- await exec(cmd);
118
+ console.log();
111
119
  }
112
120
  /**
113
121
  * download da LAN
@@ -115,92 +123,95 @@ export default class Update extends Command {
115
123
  async getPkgFromLan() {
116
124
  const Tu = new Tools();
117
125
  await Tu.loadSettings();
118
- Utils.warning('Update from LAN');
119
- if (this.distro.familyId === 'archlinux') {
126
+ Utils.warning('Update penguins-eggs from LAN');
127
+ let filter = '';
128
+ let copy = '';
129
+ let install = '';
130
+ /**
131
+ * Alpine
132
+ */
133
+ if (this.distro.familyId === 'alpine') {
134
+ let repo = `alpine/x86_64`;
135
+ filter = `penguins-eggs-*-*.*.?-r?.apk`;
136
+ copy = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/${repo}/${filter} /tmp`;
137
+ install = `apk add /tmp/${filter}`;
138
+ /**
139
+ * Arch
140
+ */
141
+ }
142
+ else if (this.distro.familyId === 'archlinux') {
120
143
  let repo = "aur";
144
+ filter = `penguins-eggs-??.*.*-?-any.pkg.tar.zst`;
121
145
  if (Diversions.isManjaroBased(this.distro.distroId)) {
122
146
  repo = 'manjaro';
147
+ filter = `penguins-eggs-??.*.*-?-any.pkg.tar.*`;
123
148
  }
124
- const filter = `penguins-eggs-25.*.*-?-any.pkg.tar.zst`;
125
- const cmd = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/${repo}/${filter} /tmp`;
126
- await exec(cmd, { capture: true, echo: true });
127
- if (await Utils.customConfirm(`Want to install ${filter}`)) {
128
- await exec(`pacman -U /tmp/${filter}`);
129
- }
130
- }
131
- else if (this.distro.familyId === 'alpine') {
132
- let arch = 'x86_64';
133
- if (process.arch === 'ia32') {
134
- arch = 'i386';
135
- }
136
- const filter = `penguins-eggs-25.*.*-r*.apk`;
137
- const cmd = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/alpine/${filter} /tmp`;
138
- await exec(cmd, { capture: true, echo: true });
139
- if (await Utils.customConfirm(`Want to install ${filter}`)) {
140
- await exec(`apk add /tmp/${filter}`);
141
- }
149
+ copy = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/${repo}/${filter} /tmp`;
150
+ install = `pacman -U /tmp/${filter}`;
151
+ /**
152
+ * Devuan/Debian/Ubuntu
153
+ */
142
154
  }
143
155
  else if (this.distro.familyId === "debian") {
144
- const filter = `penguins-eggs_25.*.*-*_${Utils.uefiArch()}.deb`;
145
- const cmd = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/debs/${filter} /tmp`;
146
- await exec(cmd, { capture: true, echo: true });
147
- if (await Utils.customConfirm(`Want to install ${filter}`)) {
148
- await exec(`dpkg -i /tmp/${filter}`);
149
- }
156
+ let repo = 'debs';
157
+ filter = `penguins-eggs_??.*.*-?_${Utils.uefiArch()}.deb`;
158
+ copy = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/${repo}/${filter} /tmp`;
159
+ install = `dpkg -i /tmp/${filter}`;
160
+ /**
161
+ * fedora/el9
162
+ */
150
163
  }
151
- }
152
- /**
153
- *
154
- */
155
- async getPkgFromSourceforge() {
156
- let repo = '';
157
- let cmd = '';
158
- let url = 'https://sourceforge.net/projects/penguins-eggs/files/Packages';
159
- let filter = `penguins-eggs`;
160
- if (this.distro.familyId === 'archlinux') {
161
- repo = "aur";
162
- filter = `penguins-eggs-10.?.*-?-any.pkg.tar.zst`;
163
- cmd = `sudo pacman -U ${filter}`;
164
- if (Diversions.isManjaroBased(this.distro.distroId)) {
165
- repo = 'manjaro';
164
+ else if (this.distro.familyId === "fedora") {
165
+ let repo = 'fedora';
166
+ let ftype = 'fc??';
167
+ if (this.distro.distroId !== 'Fedora') {
168
+ repo = 'el9';
169
+ ftype = 'el?';
166
170
  }
167
- url = `${url}/${repo}`;
171
+ filter = `penguins-eggs-??.*.*-?.${ftype}.x86_64.rpm`;
172
+ copy = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/${repo}/${filter} /tmp`;
173
+ install = `dnf reinstall /tmp/${filter} || dnf install /tmp/${filter}`;
174
+ /**
175
+ * openmamba
176
+ */
168
177
  }
169
- else if (this.distro.familyId === "alpine") {
170
- let arch = 'x86_64';
171
- if (process.arch === 'ia32') {
172
- arch = 'i386';
173
- }
174
- repo = "alpine";
175
- url = `${url}/${repo}/$arch/${Utils.uefiArch()}`;
176
- const filter = `penguins-eggs-25.*.*-r*.apk`;
177
- cmd = `doas apk add ${filter}`;
178
+ else if (this.distro.familyId === "openmamba") {
179
+ let repo = 'openmamba';
180
+ filter = `penguins-eggs-??.*.*-?mamba.x86_64.rpm`;
181
+ copy = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/${repo}/${filter} /tmp`;
182
+ install = `dnf reinstall /tmp/${filter} || dnf install /tmp/${filter}`;
183
+ /**
184
+ * opensuse
185
+ */
186
+ }
187
+ else if (this.distro.familyId === "opensuse") {
188
+ let repo = 'opensuse';
189
+ filter = `penguins-eggs-*.*.*-?.opensuse.x86_64.rpm`;
190
+ copy = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/${repo}/${filter} /tmp`;
191
+ install = `zypper install /tmp/${filter}`;
192
+ }
193
+ /**
194
+ * copy and install
195
+ */
196
+ if (await Utils.customConfirm(`Want to update/reinstall penguins-eggs`)) {
197
+ await exec(copy, { capture: true, echo: true });
198
+ await exec(install);
178
199
  }
179
- else if (this.distro.familyId === "debian") {
180
- repo = "debs";
181
- url = `${url}/${repo}`;
182
- filter = `penguins-eggs_25.*.*-*_${Utils.uefiArch()}.deb`;
183
- cmd = `sudo apt-get install ./${filter}`;
184
- }
185
- let command = `- open your browser at ${url}\n`;
186
- command += `- select and download last package: ${filter}\n`;
187
- command += `- ${cmd}\n`;
188
- console.log(command);
189
- this.show(url);
190
200
  }
191
201
  /**
192
- *
193
- * @param aptVersion
194
- */
195
- getFromSources() {
196
- console.log('You can get a fresh installation, cloning penguins-eggs:');
202
+ *
203
+ */
204
+ getFromSource() {
205
+ console.log('Use the following commands to use penguins-eggs from source:');
206
+ console.log('');
197
207
  console.log('cd ~');
198
208
  console.log('git clone https://github.com/pieroproietti/penguins-eggs');
209
+ console.log('cd penguins-eggs');
210
+ console.log('pnpm install');
211
+ console.log('pnpm build');
212
+ console.log('./eggs');
199
213
  console.log('');
200
- console.log('Then, open your browser to read detailed instructions:');
201
- console.log('https://github.com/pieroproietti/penguins-eggs/blob/master/PREREQUISITES/README.md');
202
- console.log('');
203
- console.log('');
214
+ console.log('NOTE: requires nodejs>18 and pnpm installed');
204
215
  }
205
216
  /**
206
217
  * show
@@ -19,7 +19,6 @@ export default async function bootloader() {
19
19
  let grubName = Diversion.grubName(this.distro.familyId);
20
20
  let grubForce = Diversion.grubForce(this.distro.familyId);
21
21
  let cmd = '';
22
- let grubLog = '/grub-install.lgo';
23
22
  if (this.efi) {
24
23
  /**
25
24
  * UEFI Installation
@@ -42,7 +41,7 @@ export default async function bootloader() {
42
41
  * For legacy boot, we specify the installation device directly.
43
42
  */
44
43
  const target = 'i386-pc';
45
- cmd = `chroot ${this.installTarget} ${grubName}-install --target=${target} ${this.partitions.installationDevice} ${grubForce} ${grubLog}`;
44
+ cmd = `chroot ${this.installTarget} ${grubName}-install --target=${target} ${this.partitions.installationDevice} ${grubForce}`;
46
45
  }
47
46
  // await Utils.debug(`grub-install: ${cmd}`)
48
47
  await exec(cmd, this.echo);
@@ -147,9 +147,7 @@ export default async function bootloaderConfig() {
147
147
  try {
148
148
  cmd = ``;
149
149
  cmd += `chroot ${this.installTarget} `;
150
- cmd += `dnf -y install grub2 `;
151
- cmd += `grub2-pc `;
152
- cmd += `grub2-pc-modules ${this.toNull}`;
150
+ cmd += `dnf -y install grub ${this.toNull}`;
153
151
  await exec(cmd, this.echo);
154
152
  }
155
153
  catch (error) {
@@ -0,0 +1 @@
1
+ 3930ad85d31d4d2446c15a710bc0263d2fdb86d17ab6632db42a07a5b60c7404 penguins-eggs_25.9.7-1_amd64.deb
@@ -0,0 +1 @@
1
+ a6f9943c573d294c3d67e3c475cfd04fa80b4a97a5a25304ce93eaaae0251d0c penguins-eggs_25.9.7-1_arm64.deb
@@ -0,0 +1 @@
1
+ 590e0952befc90f777d12c52e8c7ce0ac5232637f0b61bfb5d7592038f5da3c3 penguins-eggs_25.9.7-1_i386.deb
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "penguins-eggs",
3
3
  "shortName": "eggs",
4
4
  "description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
5
- "version": "25.9.3",
5
+ "version": "25.9.7",
6
6
  "author": "Piero Proietti",
7
7
  "bin": {
8
8
  "eggs": "./bin/run.js"
@@ -51,7 +51,7 @@
51
51
  "@types/shelljs": "^0.8.17",
52
52
  "@types/ws": "^8.18.1",
53
53
  "chai": "^6.0.1",
54
- "eslint": "^9.34.0",
54
+ "eslint": "^9.35.0",
55
55
  "eslint-config-oclif": "^6.0.101",
56
56
  "eslint-config-prettier": "^10.1.8",
57
57
  "glob": "^11.0.3",
@@ -1 +0,0 @@
1
- 28ef347c6cbe76b3ed0df657751b9e4c77d540926b62d0429510873bc68d9b55 penguins-eggs_25.9.3-1_amd64.deb
@@ -1 +0,0 @@
1
- e87f2ff251f6d8043cec34f6679152f36aced09de133d46056cd546f4fbfc0bc penguins-eggs_25.9.3-1_arm64.deb
@@ -1 +0,0 @@
1
- 52f636944437dab835f49e806f1e1718bc2322d4894ed81ae886909b97738bb0 penguins-eggs_25.9.3-1_i386.deb