From 787791556e3d609127e4f4467239c77557b4e6a0 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sun, 18 Dec 2022 12:58:22 +0100 Subject: [PATCH] add license info --- LICENSE.md | 19 +++++++++++++++++++ README.md | 2 ++ lib.sh | 1 + test/test.sh | 3 +++ test/test_assert_arg.sh | 3 +++ trap_error_example.sh | 2 ++ trap_exit_example.sh | 3 +++ wait_for_pid_exit.sh | 1 + wait_for_url.sh | 3 +++ 9 files changed, 37 insertions(+) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9a36e94 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +Copyright (c) 2022 Jan Lehnardt + +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. diff --git a/README.md b/README.md index fa39cc7..aa106e1 100644 --- a/README.md +++ b/README.md @@ -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. +Copyright (c) 2022 Jan Lehnardt , MIT licensed + ## Goals - Write once (here) and copypasta everywhere. diff --git a/lib.sh b/lib.sh index 8064f9e..7257c2b 100644 --- a/lib.sh +++ b/lib.sh @@ -1,3 +1,4 @@ +# Copyright (c) 2022 Jan Lehnardt , MIT licensed debug () { if [ -n "$DEBUG" ]; then diff --git a/test/test.sh b/test/test.sh index d501336..0a7e6d2 100755 --- a/test/test.sh +++ b/test/test.sh @@ -1,5 +1,8 @@ #!/bin/sh +# Copyright (c) 2022 Jan Lehnardt , MIT licensed + + #source ./wait_for_url.sh # # echo test1 diff --git a/test/test_assert_arg.sh b/test/test_assert_arg.sh index 91b6683..7bb3236 100755 --- a/test/test_assert_arg.sh +++ b/test/test_assert_arg.sh @@ -1,5 +1,8 @@ #!/bin/sh +# Copyright (c) 2022 Jan Lehnardt , MIT licensed + + . ../lib.sh echo "testing assert_arg" diff --git a/trap_error_example.sh b/trap_error_example.sh index 8a0aeef..a333690 100644 --- a/trap_error_example.sh +++ b/trap_error_example.sh @@ -1,5 +1,7 @@ # 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: +# +# Copyright (c) 2022 Jan Lehnardt , MIT licensed trap 'handle_error' ERR diff --git a/trap_exit_example.sh b/trap_exit_example.sh index c2c5922..8485808 100644 --- a/trap_exit_example.sh +++ b/trap_exit_example.sh @@ -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: +# +# Copyright (c) 2022 Jan Lehnardt , MIT licensed + trap 'kill $(jobs -p)' EXIT \ No newline at end of file diff --git a/wait_for_pid_exit.sh b/wait_for_pid_exit.sh index e2e941e..1241b3b 100644 --- a/wait_for_pid_exit.sh +++ b/wait_for_pid_exit.sh @@ -1,3 +1,4 @@ +# Copyright (c) 2022 Jan Lehnardt , MIT licensed . ./lib.sh diff --git a/wait_for_url.sh b/wait_for_url.sh index 4e30a6d..b5eb817 100644 --- a/wait_for_url.sh +++ b/wait_for_url.sh @@ -1,3 +1,6 @@ +# Copyright (c) 2022 Jan Lehnardt , MIT licensed +# inspired by https://github.com/pouchdb/pouchdb/blob/25db22fb0ff025b8d2c698da30c6c409066baa0c/bin/run-test.sh#L102-L113 +# Team PouchDB, Apache 2 licensed . ./lib.sh