chore: shellcheck & perltidy

This commit is contained in:
Stéphane Lesimple 2020-12-08 14:34:03 +00:00
parent 87128da9d6
commit c68b696702
No known key found for this signature in database
GPG key ID: 4B4A3289E9D35658
2 changed files with 3 additions and 2 deletions

View file

@ -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");
}
osh_debug("Adding allowkeeper to group $group");
$fnret = OVH::Bastion::add_user_to_group(group => $group, user => 'allowkeeper', groupType => 'key');
$fnret or HEXIT($fnret);

View file

@ -15,10 +15,11 @@ get_supported_targets() {
local target targets subtarget
for dockerfile in "$(dirname "$0")"/../../../docker/Dockerfile.*; do
if grep -q '^# TESTENV ' "$dockerfile"; then
target=$(basename $dockerfile)
target=$(basename "$dockerfile")
target=${target/Dockerfile./}
# if the file has a TESTFROM entry, then it's actually multiple similar targets
if grep -q '^# TESTFROM ' "$dockerfile"; then
# shellcheck disable=SC2013
for testfrom in $(grep '^# TESTFROM ' "$dockerfile" | cut -d' ' -f3-); do
subtarget="$target@$testfrom"
targets="$targets $subtarget"
@ -27,6 +28,7 @@ get_supported_targets() {
targets="$targets $target"
fi
done
# shellcheck disable=SC2086
echo $targets
}