mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
Instead of lengthy blurbs, switch to single-line, machine-readable standardized (https://spdx.dev) license identifiers. The Linux kernel switched long ago, so there is strong precedent. Three cases are handled: AGPL-only, Apache-only, and dual licensed. For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0), reasoning that our changes are extensive enough to apply our license. The changes we applied mechanically with a script, except to licenses/README.md. Closes #9937
68 lines
1.4 KiB
Bash
Executable File
68 lines
1.4 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
#
|
|
# Copyright (C) 2020-present ScyllaDB
|
|
#
|
|
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
#
|
|
|
|
PROGRAM=$(basename $0)
|
|
|
|
print_usage() {
|
|
echo "Usage: $PROGRAM [OPTION]..."
|
|
echo ""
|
|
echo " --mode MODE The build mode of 'scylla' to verify (options: 'release', 'dev', and 'debug')."
|
|
exit 1
|
|
}
|
|
|
|
if which podman > /dev/null 2>&1 ; then
|
|
contool=podman
|
|
elif which docker > /dev/null 2>&1 ; then
|
|
contool=docker
|
|
else
|
|
echo "Please make sure you have either podman or docker installed on this host in order to use dist-chec"
|
|
exit 1
|
|
fi
|
|
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
"--mode")
|
|
MODE=$2
|
|
shift 2
|
|
;;
|
|
"--help")
|
|
print_usage
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [ -z "$MODE" ]; then
|
|
print_usage
|
|
fi
|
|
|
|
if [ -f /.dockerenv ]; then
|
|
echo "error: running $PROGRAM in container is not supported, please run on host."
|
|
exit 1
|
|
fi
|
|
|
|
container_images=(
|
|
docker.io/centos:7
|
|
)
|
|
|
|
for container_image in "${container_images=[@]}"
|
|
do
|
|
container_script="${container_image//:/-}"
|
|
install_sh="$(pwd)/tools/testing/dist-check/$container_script.sh"
|
|
if [ -f "$install_sh" ]; then
|
|
$contool run -i --rm -v $(pwd):$(pwd) $container_image /bin/bash -c "cd $(pwd) && $install_sh --mode $MODE"
|
|
else
|
|
echo "internal error: $install_sh does not exist, please create one to verify packages on $container_image."
|
|
exit 1
|
|
fi
|
|
done
|