palabra 2.1.0 → 2.3.0
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/ChangeLog +10 -0
- package/README.md +1 -1
- package/letras/haskell/haskell.json +5 -2
- package/letras/mwget/mwget.json +8 -0
- package/letras/yara/yara.json +1 -4
- package/lib/parser/parser.js +14 -2
- package/lib/parser/rename.js +15 -0
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ palabra l
|
|
|
72
72
|
|
|
73
73
|
## Env variables
|
|
74
74
|
|
|
75
|
-
Use `PALABRA_DIR` or `XDG_DATA_HOME` to override default installation path `~/.local/share`.
|
|
75
|
+
Use `PALABRA_DIR` or [`XDG_DATA_HOME`](https://specifications.freedesktop.org/basedir/latest/) to override default installation path `~/.local/share`.
|
|
76
76
|
|
|
77
77
|
That's it!
|
|
78
78
|
|
|
@@ -20,5 +20,8 @@
|
|
|
20
20
|
"ghc --version",
|
|
21
21
|
"stack --version"
|
|
22
22
|
],
|
|
23
|
-
"commands": [
|
|
24
|
-
}
|
|
23
|
+
"commands": [
|
|
24
|
+
"mv ~/.ghcup {{ directorio }}/ghcup",
|
|
25
|
+
"ln -fs {{ directorio }}/ghcup/ghc/{{ version }}/lib/ghc-{{ version }}/bin/ghc {{ directorio }}/../bin/ghc"
|
|
26
|
+
]
|
|
27
|
+
}
|
package/letras/yara/yara.json
CHANGED
package/lib/parser/parser.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {join} from 'node:path';
|
|
2
2
|
import {rendy} from 'rendy';
|
|
3
|
+
import {rename} from './rename.js';
|
|
3
4
|
import {extract, isArchive} from './extract.js';
|
|
4
5
|
import {execute, isExecute} from './execute.js';
|
|
5
6
|
import {parseEnv} from './parse-env.js';
|
|
@@ -63,6 +64,9 @@ export const parse = (letra) => {
|
|
|
63
64
|
bin,
|
|
64
65
|
}));
|
|
65
66
|
|
|
67
|
+
if (letra.rename)
|
|
68
|
+
commands.push(...rename(letra));
|
|
69
|
+
|
|
66
70
|
if (letra.commands)
|
|
67
71
|
commands.push(...run({
|
|
68
72
|
letra,
|
|
@@ -92,8 +96,16 @@ export const parse = (letra) => {
|
|
|
92
96
|
return commands;
|
|
93
97
|
};
|
|
94
98
|
|
|
95
|
-
function createSymlinks(
|
|
99
|
+
function createSymlinks(letra) {
|
|
100
|
+
const {
|
|
101
|
+
name,
|
|
102
|
+
directorio,
|
|
103
|
+
hogar,
|
|
104
|
+
bin,
|
|
105
|
+
} = letra;
|
|
106
|
+
|
|
96
107
|
const commands = [];
|
|
108
|
+
|
|
97
109
|
const parsedBin = parseBin({
|
|
98
110
|
name,
|
|
99
111
|
hogar,
|
|
@@ -103,7 +115,7 @@ function createSymlinks({name, directorio, hogar, bin}) {
|
|
|
103
115
|
const binDir = join(directorio, '..', `bin`);
|
|
104
116
|
|
|
105
117
|
for (const [name, from] of entries(parsedBin)) {
|
|
106
|
-
const binFrom = join(directorio, from);
|
|
118
|
+
const binFrom = rendy(join(directorio, from), letra);
|
|
107
119
|
const binTo = join(binDir, name);
|
|
108
120
|
|
|
109
121
|
commands.push(`ln -fs ${binFrom} ${binTo}`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {join} from 'node:path';
|
|
2
|
+
import {rendy} from 'rendy';
|
|
3
|
+
|
|
4
|
+
export const rename = (letra) => {
|
|
5
|
+
const {name, directorio} = letra;
|
|
6
|
+
const commands = [];
|
|
7
|
+
const renderedRename = rendy(letra.rename, letra);
|
|
8
|
+
const from = join(directorio, renderedRename);
|
|
9
|
+
const to = join(directorio, name);
|
|
10
|
+
|
|
11
|
+
commands.push(`mv -f ${from} ${to}`);
|
|
12
|
+
|
|
13
|
+
return commands;
|
|
14
|
+
};
|
|
15
|
+
|