diff options
author | Scott Moser <smoser@brickies.net> | 2017-07-31 13:33:44 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-07-31 14:45:21 -0400 |
commit | bca6137248b8b3dfa7569635bdd8df78c85ec230 (patch) | |
tree | aca41d291a7cac20f2011bb2cd0f955ab3555c6c | |
parent | bca10bd56adb5e3a126badb0852cea6510071576 (diff) | |
download | vyos-cloud-init-bca6137248b8b3dfa7569635bdd8df78c85ec230.tar.gz vyos-cloud-init-bca6137248b8b3dfa7569635bdd8df78c85ec230.zip |
debian/new-upstream-snapshot: wrap changelog lines better.
This just steamlines use of new-upstream-snapshot. It will now
ignore Author of 'Scott Moser' and wrap long lines so that author
entry in [] is not broken.
-rwxr-xr-x | debian/new-upstream-snapshot | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/debian/new-upstream-snapshot b/debian/new-upstream-snapshot index 6240de0d..aee432e3 100755 --- a/debian/new-upstream-snapshot +++ b/debian/new-upstream-snapshot @@ -14,9 +14,27 @@ EOF } print_commit() { - local subject="$1" author="$2" bugs="$3" aname="" + local subject="$1" author="$2" bugs="$3" aname="" buf="" abugs="" + local indent=" - " indent2=" " ll=79 aname=${author% <*} - echo " - $subject [${aname}]${bugs:+ (LP: ${bugs})}" + [ "${aname}" = "Scott Moser" ] && aname="" + abugs="${aname:+ [${aname}]}${bugs:+ (LP: ${bugs})}" + if [ $((${#subject}+${#abugs})) -le $(($ll-${#indent})) ]; then + echo "${indent}${subject}" + elif [ ${#subject} -ge $(($ll-${#indent})) ]; then + echo "${subject}${abugs}" | + fmt --width=$(($ll-${#indent})) | + sed -e "1s/^/${indent}/; 1n;" \ + -e 's/^[ ]*//' \ + -e '/^[ ]*$/d' -e "s/^/$indent2/" -e 's/[ ]\+$//' + + else + ( echo "${subject}"; echo "${abugs}" ) | + fmt --width=$(($ll-${#indent})) | + sed -e "1s/^/${indent}/; 1n;" \ + -e 's/^[ ]*//' \ + -e '/^[ ]*$/d' -e "s/^/$indent2/" -e 's/[ ]\+$//' + fi } git_log_to_dch() { |