diff options
author | Andrei Pavel <andrei@isc.org> | 2024-06-17 16:07:22 +0200 |
---|---|---|
committer | Andrei Pavel <andrei@isc.org> | 2024-06-20 17:31:30 +0200 |
commit | 3efbe09a45a01a16f9869c837d8242bd7bb6604b (patch) | |
tree | 5bee21797e98b002e7ce7848487576b43a0815d8 /src/share/yang/modules/utils/bump-up-revisions.sh | |
parent | [#3287] automatically determine list of files to shellcheck (diff) | |
download | kea-3efbe09a45a01a16f9869c837d8242bd7bb6604b.tar.xz kea-3efbe09a45a01a16f9869c837d8242bd7bb6604b.zip |
[#3287] fix reported shellcheck warnings
Diffstat (limited to 'src/share/yang/modules/utils/bump-up-revisions.sh')
-rwxr-xr-x | src/share/yang/modules/utils/bump-up-revisions.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/share/yang/modules/utils/bump-up-revisions.sh b/src/share/yang/modules/utils/bump-up-revisions.sh index 45f84c8aaf..86778fc581 100755 --- a/src/share/yang/modules/utils/bump-up-revisions.sh +++ b/src/share/yang/modules/utils/bump-up-revisions.sh @@ -25,6 +25,9 @@ Options: "$(basename "${0}")" } +red='\033[91m' +reset='\033[0m' + # Parse parameters. while test ${#} -gt 0; do case "${1}" in @@ -44,7 +47,7 @@ done # Get script path. script_path=$(cd "$(dirname "${0}")" && pwd) -pushd "${script_path}/.." +cd "${script_path}/.." # Get the last wednesday of the month. this_month=$(date +%Y-%m) @@ -59,7 +62,7 @@ done # - rename it to the new revision # - change its name in Makefile.am # - change its name in yang_revisions.h -ca=$(git merge-base origin/master $(git rev-parse --abbrev-ref HEAD)) +ca=$(git merge-base origin/master "$(git rev-parse --abbrev-ref HEAD)") for module in $(git diff "${ca}" --name-only . | grep -E '\.yang$'); do module=$(basename "${module}") new_module="$(printf '%s' "${module}" | sed "s/@.*\.yang/@${wednesday}.yang/g")" |