From df8cba2dd4a3384144b361e45a1e6de1e5310947 Mon Sep 17 00:00:00 2001 From: Joel Parker Henderson Date: Tue, 28 Mar 2023 16:25:49 +0100 Subject: [PATCH] Add help for download and source --- README.md | 21 +++++++++++++-------- posix-shell-script-kit | 21 +++++++++++++-------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c8141b4..92e08f2 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,31 @@ POSIX shell script kit is a file of POSIX helper functions. -You simply download the kit file, then source it in your script. - -The kit works for bash, zsh, dash, and many other modern Unix shells. +The kit works for bash, zsh, dash, and many more Unix shells. -The kit is free libre open source software, created by SixArm. +You simply download the kit file, then source it in your script. Constructive feedback is welcome and appreciated. -## Usage +## Download -To download this file: +To download the POSIX shell script kit file: ```sh curl -O "https://raw.githubusercontent.com/SixArm/posix-shell-script-kit/main/posix-shell-script-kit" ``` -To include this file in your own script, in the same directory: +## Source + +To use the kit in your own script, you source the kit like this: + +```sh +. /your/path/here/posix-shell-script-kit +``` + +To use the kit in your own script in the same directory, you source the kit like this: ```sh -# Include https://github.com/SixArm/posix-shell-script-kit . "$(dirname "$(readlink -f "$0")")/posix-shell-script-kit" ``` diff --git a/posix-shell-script-kit b/posix-shell-script-kit index c7afde2..06ae733 100755 --- a/posix-shell-script-kit +++ b/posix-shell-script-kit @@ -4,26 +4,31 @@ # # POSIX shell script kit is a file of POSIX helper functions. # -# You simply download the kit file, then source it in your script. -# -# The kit works for bash, zsh, dash, and many other modern Unix shells. +# The kit works for bash, zsh, dash, and many more Unix shells. # -# The kit is free libre open source software, created by SixArm. +# You simply download the kit file, then source it in your script. # # Constructive feedback is welcome and appreciated. # -# ## Usage +# ## Download # -# To download this file: +# To download the POSIX shell script kit file: # # ```sh # curl -O "https://raw.githubusercontent.com/SixArm/posix-shell-script-kit/main/posix-shell-script-kit" # ``` # -# To include this file in your own script, in the same directory: +# ## Source +# +# To use the kit in your own script, you source the kit like this: +# +# ```sh +# . /your/path/here/posix-shell-script-kit +# ``` +# +# To use the kit in your own script, in the same directory, you source the kit like this: # # ```sh -# # Include https://github.com/SixArm/posix-shell-script-kit # . "$(dirname "$(readlink -f "$0")")/posix-shell-script-kit" # ``` #