| @@ -0,0 +1,19 @@ | |||||
| Copyright (c) 2022 Jan Lehnardt <jan@apache.org> | |||||
| Permission is hereby granted, free of charge, to any person obtaining a copy | |||||
| of this software and associated documentation files (the "Software"), to deal | |||||
| in the Software without restriction, including without limitation the rights | |||||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||||
| copies of the Software, and to permit persons to whom the Software is | |||||
| furnished to do so, subject to the following conditions: | |||||
| The above copyright notice and this permission notice shall be included in all | |||||
| copies or substantial portions of the Software. | |||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||||
| SOFTWARE. | |||||
| @@ -2,6 +2,8 @@ | |||||
| I’m coming across having to write the same shell script bits occasionally, and I got tired of jumping backwards through my projects to find the latest version, so here is a repository. | I’m coming across having to write the same shell script bits occasionally, and I got tired of jumping backwards through my projects to find the latest version, so here is a repository. | ||||
| Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| ## Goals | ## Goals | ||||
| - Write once (here) and copypasta everywhere. | - Write once (here) and copypasta everywhere. | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| debug () { | debug () { | ||||
| if [ -n "$DEBUG" ]; then | if [ -n "$DEBUG" ]; then | ||||
| @@ -1,5 +1,8 @@ | |||||
| #!/bin/sh | #!/bin/sh | ||||
| # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| #source ./wait_for_url.sh | #source ./wait_for_url.sh | ||||
| # | # | ||||
| # echo test1 | # echo test1 | ||||
| @@ -1,5 +1,8 @@ | |||||
| #!/bin/sh | #!/bin/sh | ||||
| # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| . ../lib.sh | . ../lib.sh | ||||
| echo "testing assert_arg" | echo "testing assert_arg" | ||||
| @@ -1,5 +1,7 @@ | |||||
| # if you run a script with -e that produces state that you want to clean up if | # if you run a script with -e that produces state that you want to clean up if | ||||
| # anything goes wrong in your script, this helps: | # anything goes wrong in your script, this helps: | ||||
| # | |||||
| # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| trap 'handle_error' ERR | trap 'handle_error' ERR | ||||
| @@ -1,3 +1,6 @@ | |||||
| # if you run a script that launches other processes, and you want to make sure those processes exit when your script exists, this helps: | # if you run a script that launches other processes, and you want to make sure those processes exit when your script exists, this helps: | ||||
| # | |||||
| # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| trap 'kill $(jobs -p)' EXIT | trap 'kill $(jobs -p)' EXIT | ||||
| @@ -1,3 +1,4 @@ | |||||
| # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| . ./lib.sh | . ./lib.sh | ||||
| @@ -1,3 +1,6 @@ | |||||
| # Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed | |||||
| # inspired by https://github.com/pouchdb/pouchdb/blob/25db22fb0ff025b8d2c698da30c6c409066baa0c/bin/run-test.sh#L102-L113 | |||||
| # Team PouchDB, Apache 2 licensed | |||||
| . ./lib.sh | . ./lib.sh | ||||