|
|
@@ -131,6 +131,22 @@ my_fun () { |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
## `canonical_readlink $filepath` |
|
|
|
|
|
|
|
When you want to find out the directory the script you are currently running in, there are a number of UNIX filesystem indirections that are somewhat tricky to untangle. This function does that for you. |
|
|
|
|
|
|
|
Signature: |
|
|
|
|
|
|
|
```shell |
|
|
|
canonical_readlink filepath<string> |
|
|
|
``` |
|
|
|
|
|
|
|
Usage: |
|
|
|
|
|
|
|
```shell |
|
|
|
my_dir=`canonical_readlink "$0"` |
|
|
|
``` |
|
|
|
|
|
|
|
## Debugging |
|
|
|
|
|
|
|
Set `DEBUG=1` to get debugging output. |