Skip to content

Commit 306e953

Browse files
committed
fix: Libc tagging and src_cmd change. made on PR webinstall#1016
1 parent 9e48bac commit 306e953

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

tlrc/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ __init_tlrc() {
99
###############
1010

1111
# Every package should define these 6 variables
12-
pkg_cmd_name="tlrc"
12+
pkg_cmd_name="tldr"
1313

1414
pkg_dst_cmd="$HOME/.local/bin/tlrc"
1515
pkg_dst="$pkg_dst_cmd"
1616

17-
pkg_src_cmd="$HOME/.local/opt/tlrc-v$WEBI_VERSION/tlrc"
17+
pkg_src_cmd="$HOME/.local/opt/tlrc-v$WEBI_VERSION/tldr"
1818
pkg_src_dir="$HOME/.local/opt/tlrc-v$WEBI_VERSION"
1919
pkg_src="$pkg_src_cmd"
2020

@@ -29,11 +29,11 @@ __init_tlrc() {
2929

3030
# pkg_get_current_version is recommended, but not required
3131
pkg_get_current_version() {
32-
# 'tlrc --version' has output in this format:
32+
# 'tldr --version' has output in this format:
3333
# tlrc 1.11.1
3434
# This trims it down to just the version number:
3535
# 1.11.1
36-
tlrc --version 2> /dev/null |
36+
tldr --version 2> /dev/null |
3737
head -n 1 |
3838
cut -d ' ' -f 2
3939
}

tlrc/releases.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ var repo = 'tlrc';
66

77
module.exports = function () {
88
return github(null, owner, repo).then(function (all) {
9-
// tlrc has a clean release structure, no filtering needed
9+
all.releases = all.releases
10+
.map(function(rel) {
11+
if(/-gnu/.test(rel.name)){
12+
rel.libc = 'gnu';
13+
}
14+
if(/-musl/.test(rel.name)){
15+
rel.libc = 'musl';
16+
}
17+
return rel;
18+
})
1019
return all;
1120
});
1221
};

0 commit comments

Comments
 (0)