Skip to content

Commit 8fcf07f

Browse files
committed
Version 0.47
index.json no longer under each pages directory
1 parent 4250019 commit 8fcf07f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tldr-bash-client
22

3-
* version 0.46
3+
* version 0.47
44

55
### Bash client for tldr: community driven man-by-example
66
**A fully-functional [bash](https://tiswww.case.edu/php/chet/bash/bashtop.html)
@@ -110,10 +110,10 @@ coreutils, sed, grep, find
110110
Please file an issue for a question, a bug or a feature request.
111111
Or even better, send a pull request!
112112

113-
[tldr-bash-client gitlab page](http://gitlab.com/pepa65/tldr-bash-client "gitlab.com/pepa65/tldr-bash-client")
113+
[tldr-bash-client gitlab page](https://gitlab.com/pepa65/tldr-bash-client "gitlab.com/pepa65/tldr-bash-client")
114114

115115
### License
116116

117-
Original tldr client in bash by Ray Lee http://github.com/raylee/tldr (MIT license)
117+
Original tldr client in bash by Ray Lee https://github.com/raylee/tldr (MIT license)
118118

119119
The **tldr-bash-client** is relicensed under GPLv3+ and **tldr-lint** is GPLv3+ as well.

tldr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env bash
22
set +vx -o pipefail
33
[[ $- = *i* ]] && echo "Don't source this script!" && return 1
4-
version='0.46'
4+
version='0.47'
55
# tldr-bash-client version 0.44
66
# Bash client for tldr: community driven man-by-example
77
# - forked from Ray Lee, https://github.com/raylee/tldr
88
# - modified and expanded by pepa65: https://gitlab.com/pepa65/tldr-bash-client
9-
# - binary download: http://4e4.win/tldr
9+
# - binary download: https://4e4.win/tldr
1010
# Requiring: coreutils, grep, unzip, curl/wget, less (optional)
1111

1212
# The 5 elements in TLDR markup that can be styled with these colors and
@@ -207,7 +207,7 @@ Config(){
207207
trap 'cat <<<"$stdout"' EXIT ||
208208
trap 'less -~RXQFP"Browse up/down, press Q to exit " <<<"$stdout"' EXIT
209209

210-
ver="tldr-bash-client version $version$XB ${URL}http://gitlab.com/pepa65/tldr-bash-client$XURL"
210+
ver="tldr-bash-client version $version$XB ${URL}https://gitlab.com/pepa65/tldr-bash-client$XURL"
211211

212212
# Select download method
213213
! dl="$(type -P curl) -sLfo" &&
@@ -216,7 +216,7 @@ Config(){
216216
exit 3
217217

218218
repo_url='https://raw.githubusercontent.com/tldr-pages/tldr/master'
219-
zip_url='http://tldr.sh/assets/tldr.zip'
219+
zip_url='https://tldr.sh/assets/tldr.zip'
220220

221221
cachedir=$TLDR_CACHE_LOCATION
222222
if [[ -z $cachedir ]]
@@ -229,7 +229,7 @@ Config(){
229229
Err "Can't create the pages cache location $cachedir" &&
230230
exit 4
231231
# Indexes for every language should be available, $pages instead of pages
232-
index=$cachedir/pages/index.json
232+
index=$cachedir/index.json
233233
# update if the file doesn't exists, or if it's older than $TLDR_EXPIRY
234234
[[ -f $index ]] && Recent "$index" || Cache_fill
235235
platforms=$(cd "$cachedir/pages"; ls -d -- */ |tr -d /)
@@ -419,7 +419,7 @@ Cache_fill(){
419419
exit 9
420420
fi
421421
rm -rf -- "${cachedir:?}/"*
422-
mv -- "$tmp"/pages* "${cachedir:?}/"
422+
mv -- "$tmp/index.json" "$tmp"/pages* "${cachedir:?}/"
423423
rm -rf -- "$tmp"
424424
Inf "Pages cached in $U$cachedir$XU"
425425
updated=1

0 commit comments

Comments
 (0)