Commit 104248ed authored by Vitaly Lipatov's avatar Vitaly Lipatov

rewrite add_changelog_helper

parent ab4ce390
......@@ -149,18 +149,21 @@ add_changelog_helper()
{
# don't work sometime?
# TODO: fix with $@, single arg?
local DESC SPEC
if ! tty -s && [ -z "$DESC" ] ; then
local DESC="$1"
shift
local SPECS="$*"
if ! tty -s && [ -z "$DESC" ] ; then
echo "skip changelog fixing without tty"
return 1
fi
add_changelog -e "$@"
[ -z "$DESC$SPEC" ] && fatal "run add_changelog with incorrect args"
add_changelog -e "$DESC" $SPECS
R=$?
[ -z "$EDITOR" ] && { echo "skip changelog editing without EDITOR var"; return 1 ; }
# If changelog sucessfully added
if [ "$R" = "0" ]; then
shift
for SPEC in "$@" ; do
local SPEC
for SPEC in $SPECS ; do
N=`grep -n '^%changelog' $SPEC | head -n 1 | sed s!:.*!!g`
# +1 -- comment with date and packager name
# +2 -- place for edit comments
......
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