diff --git a/documents/references.md b/documents/references.md index 1cbca98ab0bfd381e6bee5ce1bd4b9d1c5851ee6..eab90c651cee6962c66e98bcec42164aefe4a1ad 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 83bc347cc93b99e14494d0a529d461e932d4f69d..235335d3c2bf052cf443c06da0869c4967146d26 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.