mirror of
https://github.com/ovh/the-bastion.git
synced 2025-09-04 20:14:22 +08:00
chore: shellcheck & perltidy
This commit is contained in:
parent
87128da9d6
commit
c68b696702
2 changed files with 3 additions and 2 deletions
|
@ -195,7 +195,6 @@ foreach my $gr ("$group-owner", "$group-gatekeeper", "$group-aclkeeper", "osh-wh
|
||||||
or HEXIT('ERR_SETFACL_FAILED', msg => "Error setting ACLs on group homedir");
|
or HEXIT('ERR_SETFACL_FAILED', msg => "Error setting ACLs on group homedir");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
osh_debug("Adding allowkeeper to group $group");
|
osh_debug("Adding allowkeeper to group $group");
|
||||||
$fnret = OVH::Bastion::add_user_to_group(group => $group, user => 'allowkeeper', groupType => 'key');
|
$fnret = OVH::Bastion::add_user_to_group(group => $group, user => 'allowkeeper', groupType => 'key');
|
||||||
$fnret or HEXIT($fnret);
|
$fnret or HEXIT($fnret);
|
||||||
|
|
|
@ -15,10 +15,11 @@ get_supported_targets() {
|
||||||
local target targets subtarget
|
local target targets subtarget
|
||||||
for dockerfile in "$(dirname "$0")"/../../../docker/Dockerfile.*; do
|
for dockerfile in "$(dirname "$0")"/../../../docker/Dockerfile.*; do
|
||||||
if grep -q '^# TESTENV ' "$dockerfile"; then
|
if grep -q '^# TESTENV ' "$dockerfile"; then
|
||||||
target=$(basename $dockerfile)
|
target=$(basename "$dockerfile")
|
||||||
target=${target/Dockerfile./}
|
target=${target/Dockerfile./}
|
||||||
# if the file has a TESTFROM entry, then it's actually multiple similar targets
|
# if the file has a TESTFROM entry, then it's actually multiple similar targets
|
||||||
if grep -q '^# TESTFROM ' "$dockerfile"; then
|
if grep -q '^# TESTFROM ' "$dockerfile"; then
|
||||||
|
# shellcheck disable=SC2013
|
||||||
for testfrom in $(grep '^# TESTFROM ' "$dockerfile" | cut -d' ' -f3-); do
|
for testfrom in $(grep '^# TESTFROM ' "$dockerfile" | cut -d' ' -f3-); do
|
||||||
subtarget="$target@$testfrom"
|
subtarget="$target@$testfrom"
|
||||||
targets="$targets $subtarget"
|
targets="$targets $subtarget"
|
||||||
|
@ -27,6 +28,7 @@ get_supported_targets() {
|
||||||
targets="$targets $target"
|
targets="$targets $target"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
# shellcheck disable=SC2086
|
||||||
echo $targets
|
echo $targets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue