mirror of
https://github.com/docker/docker-bench-security.git
synced 2024-11-01 08:31:44 +01:00
fix(bash): update bash script to fix exec from another dir prob
Signed-off-by: Maik Ellerbrock <opensource@frapsoft.com>
This commit is contained in:
parent
562e38da7c
commit
dcecae29e9
1 changed files with 8 additions and 8 deletions
|
@ -10,13 +10,13 @@
|
|||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Load dependencies
|
||||
. ./output_lib.sh
|
||||
. ./helper_lib.sh
|
||||
|
||||
# Setup the paths
|
||||
this_path=$(abspath "$0") ## Path of this file including filenamel
|
||||
myname=$(basename "${this_path}") ## file name of this script.
|
||||
this_path=$(dirname "${0}") ## Path of this file including filenamel
|
||||
myname=$(basename "${this_path}") ## file name of this script.
|
||||
|
||||
# Load dependencies
|
||||
. ${this_path}/output_lib.sh
|
||||
. ${this_path}/helper_lib.sh
|
||||
|
||||
export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin/
|
||||
|
||||
|
@ -90,9 +90,9 @@ main () {
|
|||
# List all running containers except docker-bench (use names to improve readability in logs)
|
||||
containers=$(docker ps | sed '1d' | awk '{print $NF}' | grep -v "$benchcont")
|
||||
|
||||
for test in tests/*.sh
|
||||
for test in ${this_path}/tests/*.sh
|
||||
do
|
||||
. ./"$test"
|
||||
. "${test}"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue