Split GNU-style -e "{...}" command into multiple blocks suitable for
all versions.
get_spec_version() {
get_staged_file -o "$1".spec.in
test -f $MYTMP/files/"$1".spec.in || return 0 # Spec file is optional
get_spec_version() {
get_staged_file -o "$1".spec.in
test -f $MYTMP/files/"$1".spec.in || return 0 # Spec file is optional
- sed -n -e '1,/^%changelog/d' -e '/^*/{s/.*- \([0-9].*\)/\1/p;q}' "$1".spec.in
+ sed -n -e '1,/^%changelog/d' -e '/^*/{' -e 's/.*- \([0-9].*\)/\1/p' -e q -e '}' "$1".spec.in