Move pages under tldr, lint run.sh, update docs

This commit is contained in:
2024-02-21 13:58:43 +02:00
parent 3d653cc7e6
commit 2c475fa62d
4806 changed files with 36 additions and 35 deletions

6
.github/README.md vendored
View File

@@ -15,8 +15,8 @@ git clone https://github.com/ivuorinen/cheatsheet-tldr.git ~/.cheat/cheatsheets/
Configure your `cheat.yaml` to include the cheatsheets: Configure your `cheat.yaml` to include the cheatsheets:
```yaml ```yaml
- name: tldr - name: tldr
path: ~/.cheat/cheatsheets/tldr path: ~/.cheat/cheatsheets/tldr/tldr
tags: [tldr] tags: [tldr]
readonly: true readonly: true
``` ```
@@ -33,4 +33,4 @@ cheat --tags tldr
## License ## License
Files under `.github/` are licensed under the [MIT License](LICENSE.md). Files under `.github/` are licensed under the [MIT License](LICENSE.md).
TLDR pages licensed under [CC-BY-4.0](https://github.com/tldr-pages/tldr/blob/main/LICENSE.md). TLDR pages under `tldr/` licensed under [CC-BY-4.0](https://github.com/tldr-pages/tldr/blob/main/LICENSE.md).

8
.github/run.sh vendored
View File

@@ -6,7 +6,7 @@
# TLDR pages licensed under CC-BY-4.0 # TLDR pages licensed under CC-BY-4.0
# https://github.com/tldr-pages/tldr/blob/main/LICENSE.md # https://github.com/tldr-pages/tldr/blob/main/LICENSE.md
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Running: $DIR/run.sh" echo "Running: $DIR/run.sh"
echo "Working directory: $DIR" echo "Working directory: $DIR"
@@ -17,7 +17,7 @@ TLDR_GIT="https://github.com/tldr-pages/tldr.git"
TLDR_SOURCE="source: $TLDR_GIT" TLDR_SOURCE="source: $TLDR_GIT"
TLDR_SYNTAX="syntax: markdown" TLDR_SYNTAX="syntax: markdown"
TLDR_TEMP_DIR="$(realpath "$DIR"/..)/__tldr-temp" TLDR_TEMP_DIR="$(realpath "$DIR"/..)/__tldr-temp"
TLDR_CHEAT_DEST="$(realpath "$DIR"/../)" TLDR_CHEAT_DEST="$(realpath "$DIR"/../tldr)"
if [ -d "$TLDR_TEMP_DIR" ]; then if [ -d "$TLDR_TEMP_DIR" ]; then
rm -rf "$TLDR_TEMP_DIR" rm -rf "$TLDR_TEMP_DIR"
@@ -55,8 +55,8 @@ for d in "$TLDR_TEMP_DIR"/pages/*; do
# echo "-> dest: $TLDR_FILE" # echo "-> dest: $TLDR_FILE"
# Update the original file for making the replaceable value comparable # Update the original file for making the replaceable value comparable
if [ -f "$FILE" ] && [ '---' != "$(head -1 < "$FILE")" ]; then if [ -f "$FILE" ] && [ '---' != "$(head -1 <"$FILE")" ]; then
echo -e "---\n$TLDR_SYNTAX\n$TLDR_TAGS\n$TLDR_SOURCE\n---\n$(cat "$FILE")" > "$FILE" echo -e "---\n$TLDR_SYNTAX\n$TLDR_TAGS\n$TLDR_SOURCE\n---\n$(cat "$FILE")" >"$FILE"
fi fi
replaceable "$FILE" "$TLDR_FILE" replaceable "$FILE" "$TLDR_FILE"

1
.gitignore vendored
View File

@@ -1 +1,2 @@
__tldr-temp __tldr-temp
!*-secret

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More