Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist: adjust script imports to be able to use /usr/libexec #559

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docker-bench-security.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

version='1.6.0'

LIBEXEC="." # Distributions can change this to /usr/libexec or similar.

# Load dependencies
. ./functions/functions_lib.sh
. ./functions/helper_lib.sh
. $LIBEXEC/functions/functions_lib.sh
. $LIBEXEC/functions/helper_lib.sh

# Setup the paths
this_path=$(abspath "$0") ## Path of this file including filename
Expand Down Expand Up @@ -99,7 +101,7 @@ do
done

# Load output formating
. ./functions/output_lib.sh
. $LIBEXEC/functions/output_lib.sh

yell_info

Expand Down Expand Up @@ -161,8 +163,8 @@ main () {
images=$(docker images -q $LABELS| grep -v "$benchcont")
fi

for test in tests/*.sh; do
. ./"$test"
for test in $LIBEXEC/tests/*.sh; do
. "$test"
done

if [ -z "$check" ] && [ ! "$checkexclude" ]; then
Expand Down