From b85049048d9b3387ef45aeb3a5aa39505976a25c Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Sat, 10 Oct 2020 10:11:46 -0400 Subject: [PATCH] Update documentation --- documents/references.md | 26 ++++++++++++++++---------- readme.md | 7 ++++--- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/documents/references.md b/documents/references.md index 1cbca98..eab90c6 100644 --- a/documents/references.md +++ b/documents/references.md @@ -27,19 +27,15 @@ Various references used in project. ## References -### Including other Script Files -<https://stackoverflow.com/a/10823650> - -### Check Number of Passed Args -<https://stackoverflow.com/a/6482403> -### Get User's name -<https://stackoverflow.com/a/19306837> +### Directory Handling +#### Including other Script Files +<https://stackoverflow.com/a/10823650> -### Check for Root User -<https://stackoverflow.com/a/18216122> +#### Getting Directory of Calling Script +<https://stackoverflow.com/a/59916> -### Get Absolute Directory +#### Get Absolute Directory <https://stackoverflow.com/a/21188136> ### Text Manipulation @@ -51,3 +47,13 @@ Various references used in project. #### String Trimming Manipulation <https://stackoverflow.com/a/14703709> + +### Other +#### Check Number of Passed Args +<https://stackoverflow.com/a/6482403> + +#### Get User's name +<https://stackoverflow.com/a/19306837> + +#### Check for Root User +<https://stackoverflow.com/a/18216122> diff --git a/readme.md b/readme.md index 83bc347..235335d 100644 --- a/readme.md +++ b/readme.md @@ -11,11 +11,12 @@ and checking current user value, and prompts of yes/no user input. ## Using the Script First, copy the `utils.sh` script into your desired project folder. -Next, call it in a different script with the line `. .<path_to_utils_file>`. Note that this should be near the top of -the file. +Next, call it in a different script with the line `. $(dirname ${0})/<relative_path_to_script_file>`. Note that this +should be near the top of the file. For example, if both `utils.sh` and the calling script are in the same directory, then the syntax would be: - . ./utils.sh + + . $(dirname ${0})/utils.sh At this point, you should have full functionality of the `utils.sh` file. -- GitLab