Browse Source

add license info

main
Jan Lehnardt 1 year ago
parent
commit
787791556e
9 changed files with 37 additions and 0 deletions
  1. +19
    -0
      LICENSE.md
  2. +2
    -0
      README.md
  3. +1
    -0
      lib.sh
  4. +3
    -0
      test/test.sh
  5. +3
    -0
      test/test_assert_arg.sh
  6. +2
    -0
      trap_error_example.sh
  7. +3
    -0
      trap_exit_example.sh
  8. +1
    -0
      wait_for_pid_exit.sh
  9. +3
    -0
      wait_for_url.sh

+ 19
- 0
LICENSE.md View File

@@ -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
- 0
README.md View File

@@ -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 <jan@apache.org>, MIT licensed

## Goals

- Write once (here) and copypasta everywhere.


+ 1
- 0
lib.sh View File

@@ -1,3 +1,4 @@
# Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed

debug () {
if [ -n "$DEBUG" ]; then


+ 3
- 0
test/test.sh View File

@@ -1,5 +1,8 @@
#!/bin/sh

# Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed


#source ./wait_for_url.sh
#
# echo test1


+ 3
- 0
test/test_assert_arg.sh View File

@@ -1,5 +1,8 @@
#!/bin/sh

# Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed


. ../lib.sh

echo "testing assert_arg"


+ 2
- 0
trap_error_example.sh View File

@@ -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 <jan@apache.org>, MIT licensed

trap 'handle_error' ERR



+ 3
- 0
trap_exit_example.sh View File

@@ -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 <jan@apache.org>, MIT licensed


trap 'kill $(jobs -p)' EXIT

+ 1
- 0
wait_for_pid_exit.sh View File

@@ -1,3 +1,4 @@
# Copyright (c) 2022 Jan Lehnardt <jan@apache.org>, MIT licensed

. ./lib.sh



+ 3
- 0
wait_for_url.sh View File

@@ -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



Loading…
Cancel
Save