|
|
@@ -4,6 +4,8 @@ I’m coming across having to write the same shell script bits occasionally, and |
|
|
|
|
|
|
|
This is a *slowly* growing collection of hopefully useful and reusable shell functions and patterns. |
|
|
|
|
|
|
|
Currently tested in macOS only. |
|
|
|
|
|
|
|
Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed |
|
|
|
|
|
|
|
## Goals |
|
|
@@ -29,8 +31,6 @@ This section documents reusable functions for your scripts. |
|
|
|
|
|
|
|
Wait for a particular URL to be available using `curl`. Wait `$duration` seconds between attempts, try `$iterations` times. Defaults to `1` seconds and `3` times. |
|
|
|
|
|
|
|
Requires `bash`. |
|
|
|
|
|
|
|
Signature: |
|
|
|
|
|
|
|
```shell |
|
|
@@ -56,8 +56,6 @@ wait_for_url http://127.0.0.1:5984 5 3 |
|
|
|
|
|
|
|
Wait for a particular PID to exit. Wait `$duration` seconds between attempts, try `$iterations` times. Defaults to `1` seconds and `3` times. |
|
|
|
|
|
|
|
Requires `bash`. |
|
|
|
|
|
|
|
Signature: |
|
|
|
|
|
|
|
```shell |
|
|
|