Todd Lyons <[EMAIL PROTECTED]> writes:
> increment_spec_version() {
[...]
> add_spec_changelog() {
[...]
for this stuff you can short it with emacs :
#!/bin/bash
# -*- Mode: shell-script -*-
# Chmouel Boudjnah <[EMAIL PROTECTED]>
name="Chmouel Boudjnah"
email="[EMAIL PROTECTED]"
increase=
opt=
while getopts i opt
do
case "$opt" in
i) increase="--eval (rpm-increase-release-tag)";;
esac
done
shift $((OPTIND - 1))
FILE=$1
CHANGE=$2
if [[ -z $FILE || -z $CHANGE ]];then
echo "Usage: FILE.SPEC CHANGELOG";
exit 1;
fi
tmp=/tmp/.add-changelog-emacs.$$
cat << EOF > $tmp
(setq user-full-name "$name")
(setq user-mail-address "$email")
EOF
emacs --no-site-file -batch -q -load $tmp \
--load "/usr/share/emacs/site-lisp/rpm-spec-mode.el" \
--eval "(find-file \"$FILE\")" \
$increase \
--eval "(rpm-add-change-log-entry \"$CHANGE\")" \
--eval "(write-file \"$FILE\")"
rm -f $tmp