Version 0.47
index.json no longer under each pages directory
This commit is contained in:
parent
4250019f23
commit
8fcf07f263
|
@ -1,6 +1,6 @@
|
|||
# tldr-bash-client
|
||||
|
||||
* version 0.46
|
||||
* version 0.47
|
||||
|
||||
### Bash client for tldr: community driven man-by-example
|
||||
**A fully-functional [bash](https://tiswww.case.edu/php/chet/bash/bashtop.html)
|
||||
|
@ -110,10 +110,10 @@ coreutils, sed, grep, find
|
|||
Please file an issue for a question, a bug or a feature request.
|
||||
Or even better, send a pull request!
|
||||
|
||||
[tldr-bash-client gitlab page](http://gitlab.com/pepa65/tldr-bash-client "gitlab.com/pepa65/tldr-bash-client")
|
||||
[tldr-bash-client gitlab page](https://gitlab.com/pepa65/tldr-bash-client "gitlab.com/pepa65/tldr-bash-client")
|
||||
|
||||
### License
|
||||
|
||||
Original tldr client in bash by Ray Lee http://github.com/raylee/tldr (MIT license)
|
||||
Original tldr client in bash by Ray Lee https://github.com/raylee/tldr (MIT license)
|
||||
|
||||
The **tldr-bash-client** is relicensed under GPLv3+ and **tldr-lint** is GPLv3+ as well.
|
||||
|
|
12
tldr
12
tldr
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
set +vx -o pipefail
|
||||
[[ $- = *i* ]] && echo "Don't source this script!" && return 1
|
||||
version='0.46'
|
||||
version='0.47'
|
||||
# tldr-bash-client version 0.44
|
||||
# Bash client for tldr: community driven man-by-example
|
||||
# - forked from Ray Lee, https://github.com/raylee/tldr
|
||||
# - modified and expanded by pepa65: https://gitlab.com/pepa65/tldr-bash-client
|
||||
# - binary download: http://4e4.win/tldr
|
||||
# - binary download: https://4e4.win/tldr
|
||||
# Requiring: coreutils, grep, unzip, curl/wget, less (optional)
|
||||
|
||||
# The 5 elements in TLDR markup that can be styled with these colors and
|
||||
|
@ -207,7 +207,7 @@ Config(){
|
|||
trap 'cat <<<"$stdout"' EXIT ||
|
||||
trap 'less -~RXQFP"Browse up/down, press Q to exit " <<<"$stdout"' EXIT
|
||||
|
||||
ver="tldr-bash-client version $version$XB ${URL}http://gitlab.com/pepa65/tldr-bash-client$XURL"
|
||||
ver="tldr-bash-client version $version$XB ${URL}https://gitlab.com/pepa65/tldr-bash-client$XURL"
|
||||
|
||||
# Select download method
|
||||
! dl="$(type -P curl) -sLfo" &&
|
||||
|
@ -216,7 +216,7 @@ Config(){
|
|||
exit 3
|
||||
|
||||
repo_url='https://raw.githubusercontent.com/tldr-pages/tldr/master'
|
||||
zip_url='http://tldr.sh/assets/tldr.zip'
|
||||
zip_url='https://tldr.sh/assets/tldr.zip'
|
||||
|
||||
cachedir=$TLDR_CACHE_LOCATION
|
||||
if [[ -z $cachedir ]]
|
||||
|
@ -229,7 +229,7 @@ Config(){
|
|||
Err "Can't create the pages cache location $cachedir" &&
|
||||
exit 4
|
||||
# Indexes for every language should be available, $pages instead of pages
|
||||
index=$cachedir/pages/index.json
|
||||
index=$cachedir/index.json
|
||||
# update if the file doesn't exists, or if it's older than $TLDR_EXPIRY
|
||||
[[ -f $index ]] && Recent "$index" || Cache_fill
|
||||
platforms=$(cd "$cachedir/pages"; ls -d -- */ |tr -d /)
|
||||
|
@ -419,7 +419,7 @@ Cache_fill(){
|
|||
exit 9
|
||||
fi
|
||||
rm -rf -- "${cachedir:?}/"*
|
||||
mv -- "$tmp"/pages* "${cachedir:?}/"
|
||||
mv -- "$tmp/index.json" "$tmp"/pages* "${cachedir:?}/"
|
||||
rm -rf -- "$tmp"
|
||||
Inf "Pages cached in $U$cachedir$XU"
|
||||
updated=1
|
||||
|
|
Loading…
Reference in New Issue