Skip to content

Commit

Permalink
Add SPDX headers to hack scripts
Browse files Browse the repository at this point in the history
The hack directory scripts had no copyright info. Use the same as the Go
files.

Added using:

    $ reuse addheader \
        --copyright 'The RamenDR authors' \
        --exclude-year \
        --license Apache-2.0 \
        --template ramen \
        `git ls-files | grep -E 'hack/.+\.sh$'`

Signed-off-by: Nir Soffer <[email protected]>
  • Loading branch information
nirs committed Oct 27, 2022
1 parent 4c544e6 commit 47b099f
Show file tree
Hide file tree
Showing 34 changed files with 129 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/curl-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
if ! command -v curl; then
wget -O ${1}/curl https://github.com/moparisthebest/static-curl/releases/download/v7.76.0/curl-amd64
Expand Down
4 changes: 4 additions & 0 deletions hack/docker-client-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh disable=2046,2086
set -x
set -- $1 20.10.6
Expand Down
3 changes: 3 additions & 0 deletions hack/docker-install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh disable=2046,2086
docker_install()
{
Expand Down
4 changes: 4 additions & 0 deletions hack/docker-uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

set -x
set -e
if test -x "${1}"/dockerd-rootless-setuptool.sh; then
Expand Down
3 changes: 3 additions & 0 deletions hack/exit_stack.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh
trap 'set -- $?; trap - EXIT; eval $exit_stack; echo exit status: $1' EXIT
trap 'trap - EXIT; eval $exit_stack' EXIT
Expand Down
4 changes: 4 additions & 0 deletions hack/fuse-overlayfs-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
set -x
# https://github.com/containers/fuse-overlayfs
Expand Down
3 changes: 3 additions & 0 deletions hack/git-checkout.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh disable=2086
git_checkout()
{
Expand Down
4 changes: 4 additions & 0 deletions hack/github-url.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

github_url_file()
{
echo https://raw.githubusercontent.com/"$1"/"$3"/"$2"
Expand Down
3 changes: 3 additions & 0 deletions hack/go-install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh disable=2046,2086
go_install()
{
Expand Down
4 changes: 4 additions & 0 deletions hack/kubectl-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2046,2086
if ! command -v kubectl\
||\
Expand Down
4 changes: 4 additions & 0 deletions hack/kustomize-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2046,2086
if ! command -v kustomize; then
$(dirname ${0})/curl-install.sh ${1}
Expand Down
4 changes: 4 additions & 0 deletions hack/minikube-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2046,2086
if ! command -v minikube; then
# https://minikube.sigs.k8s.io/docs/start/
Expand Down
4 changes: 4 additions & 0 deletions hack/minikube-ramen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
set -e
ramen_hack_directory_path_name=$(dirname $0)
Expand Down
4 changes: 4 additions & 0 deletions hack/minikube-rook-mirror-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

set -x
set -e -o pipefail
scriptdir="$(dirname "$(realpath "$0")")"
Expand Down
4 changes: 4 additions & 0 deletions hack/minikube-rook-mirror-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

set -x
set -e -o pipefail

Expand Down
4 changes: 4 additions & 0 deletions hack/minikube-rook-setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

set -x
set -e -o pipefail

Expand Down
4 changes: 4 additions & 0 deletions hack/minikube.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
minikube_minio_url()
{
Expand Down
4 changes: 4 additions & 0 deletions hack/ocm-minikube-ramen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=1090,2046,2086,1091
set -x
set -e
Expand Down
4 changes: 4 additions & 0 deletions hack/ocm-minikube.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=1090,1091,2046,2086

# open cluster management (ocm) hub and managed minikube kvm amd64 clusters deploy
Expand Down
4 changes: 4 additions & 0 deletions hack/olm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=1090,2086,1091

OLM_BASE_URL="https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.19.1"
Expand Down
4 changes: 4 additions & 0 deletions hack/podman-docker-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2046,2086
if ! command -v docker; then
$(dirname ${0})/podman-install.sh
Expand Down
4 changes: 4 additions & 0 deletions hack/podman-docker-uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
if test "$(file -h /usr/bin/docker)" = '/usr/bin/docker: symbolic link to /usr/bin/podman'
then
Expand Down
4 changes: 4 additions & 0 deletions hack/podman-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
if ! command -v podman; then
# https://podman.io/getting-started/installation#linux-distributions
Expand Down
4 changes: 4 additions & 0 deletions hack/podman-uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2046,2086
if command -v podman; then
$(dirname ${0})/podman-docker-uninstall.sh
Expand Down
4 changes: 4 additions & 0 deletions hack/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#! /bin/bash

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# vim: set ts=4 sw=4 et :

# Usage: pre-commit.sh
Expand Down
4 changes: 4 additions & 0 deletions hack/setup-kind-cluster.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#! /bin/bash

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

set -e -o pipefail

KIND_IMAGE="${KIND_IMAGE:-1.20.7@sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9}"
Expand Down
3 changes: 3 additions & 0 deletions hack/shell_option_store_restore.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh disable=2086
shell_option_store()
{
Expand Down
4 changes: 4 additions & 0 deletions hack/shio-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=1090,2046,2086
set -e

Expand Down
3 changes: 3 additions & 0 deletions hack/true_if_exit_status_and_stderr.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh
true_if_exit_status_and_stderr()
{
Expand Down
4 changes: 4 additions & 0 deletions hack/uidmap-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=1091
if ! command -v newuidmap
then
Expand Down
3 changes: 3 additions & 0 deletions hack/until_true_or_n.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck shell=sh disable=2086
until_true_or_n()
{
Expand Down
4 changes: 4 additions & 0 deletions hack/velero-install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
set -x
set -e
Expand Down
4 changes: 4 additions & 0 deletions hack/velero-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=1090,2046,2086
set -e
ramen_hack_directory_path_name=$(dirname $0)
Expand Down
4 changes: 4 additions & 0 deletions hack/velero-uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh

# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# shellcheck disable=2086
set -x
set -e
Expand Down

0 comments on commit 47b099f

Please sign in to comment.