Commit d6495ed0 authored by Ben Boeckel's avatar Ben Boeckel

update-common: add missing semicolon

Quoting this page[1] on the differences in sed implementations:

    function lists (multiple function calls enclosed in {...}), be sure
    to also terminate the last function, before the closing }, with ;.

We need to terminate every function in a function list with a newline
(or semicolon).

[1]https://riptutorial.com/sed/topic/9436/bsd-macos-sed-vs--gnu-sed-vs--the-posix-sed-specification

See: vtk/vtk#17593
parent 040d65fe
......@@ -56,7 +56,7 @@ disable_custom_gitattributes() {
pushd "${extractdir}/${name}-reduced"
# Git does not allow custom attributes in a subdirectory where we
# are about to merge the `.gitattributes` file, so disable them.
sed -i '/^\[attr\]/ {s/^/#/}' .gitattributes
sed -i '/^\[attr\]/ {s/^/#/;}' .gitattributes
popd
}
......@@ -95,7 +95,7 @@ if [ ! -d "$(git rev-parse --show-toplevel)/$subtree" ]; then
else
readonly basehash="$( git rev-list --author="$ownership" --grep="$basehash_regex" -n 1 HEAD )"
fi
readonly upstream_old_short="$( git cat-file commit "$basehash" | sed -n '/'"$basehash_regex"'/ {s/.*(//;s/)//;p}' | egrep '^[0-9a-f]+$' )"
readonly upstream_old_short="$( git cat-file commit "$basehash" | sed -n '/'"$basehash_regex"'/ {s/.*(//;s/)//;p;}' | egrep '^[0-9a-f]+$' )"
[ -n "$basehash" ] || \
warn "'basehash' is empty; performing initial import"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment