Skip to content

Commit 3a0e838

Browse files
committed
refactor: get_ostree_data.sh use env shebang - remove from .sanity*
Use the `#!/usr/bin/env bash` shebang which is ansible-test friendly. This means we can remove get_ostree_data.sh from the .sanity* files. This also means we can remove the .sanity* files if we do not need them otherwise. Rename `pth` to `path` in honor of nscott Signed-off-by: Rich Megginson <[email protected]>
1 parent 07a2988 commit 3a0e838

File tree

6 files changed

+4
-9
lines changed

6 files changed

+4
-9
lines changed

.ostree/get_ostree_data.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -euo pipefail
44

@@ -28,7 +28,7 @@ if [ "$pkgtype" = testing ]; then
2828
fi
2929

3030
get_rolepath() {
31-
local ostree_dir role rolesdir roles_parent_dir coll_path pth
31+
local ostree_dir role rolesdir roles_parent_dir coll_path path
3232
ostree_dir="$1"
3333
role="$2"
3434
roles_parent_dir="$(dirname "$(dirname "$ostree_dir")")"
@@ -51,8 +51,8 @@ get_rolepath() {
5151
coll_path="${ANSIBLE_COLLECTIONS_PATHS:-}"
5252
fi
5353
if [ -n "${coll_path}" ]; then
54-
for pth in ${coll_path//:/ }; do
55-
for rolesdir in "$pth"/ansible_collections/*/*_system_roles/roles/"$role"/.ostree; do
54+
for path in ${coll_path//:/ }; do
55+
for rolesdir in "$path"/ansible_collections/*/*_system_roles/roles/"$role"/.ostree; do
5656
if [ -d "$rolesdir" ]; then
5757
echo "$rolesdir"
5858
return 0

.sanity-ansible-ignore-2.12.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.sanity-ansible-ignore-2.13.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.sanity-ansible-ignore-2.14.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.sanity-ansible-ignore-2.15.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.sanity-ansible-ignore-2.9.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)