#
load_options() {
- # FIXME: Sourcing config files like this is really a bad idea; users may
+ # FIXME: Sourcing config files like this is really a bad idea; users may
# easily override any function in this program inside his config files.
if [ -f /etc/gentoolkit/ebump.conf ] ; then
# splitname (version|name|revision) package-name-version-revision
#
splitname() {
- case $1 in
+ case $1 in
version)
echo ${2} | sed -r "s/.*-([0-9].*)/\1/"
;;
die "Could not find ${ebuild_arg}"
fi
einfo "Processing ebuild ${ebuild_name}"
-
+
#
# Bump revision suffix (or add one)
#
# Gather list of auxiliary files in files/ that has a versioned
# filename, where the version matches our current version.
-
+
bumplist=""
for x in $(echo files/*) ; do
if [ ! -z $(echo $x | grep "${PV}$") ] ; then
bumplist="${bumplist} ${x}"
fi
done
-
+
# Bump version of all matches
for x in ${bumplist} ; do
# echo "addfiles ${addfiles}"
# echo "delfiles ${delfiles}"
+ filelist="${addfiles}"
#
# (Optional) Add ChangeLog entry
#
# Write new entry
- echo "*${newPF} ${curdate}"
+ echo "*${newPF} (${curdate})"
echo
echo " ${curdate}; ${AUTHORNAME} <${AUTHOREMAIL}> ${filelist}"
# If we don't have a commit message, add comment
- if [ -z "${opt_commitmessage}" ] ; then
+ if [ -z "${opt_commitmessage}" ] ; then
echo " # INSERT ENTRY HERE"
- echo
+ if [ "${opt_delete_old}" == "y" ] && [ ! -z "${delfiles}" ] ; then
+ echo " Removed ${delfiles}."
+ fi
+ echo
else
echo " ${opt_commitmessage}"
- echo
+ echo
fi
# Write tail of old ChangeLog
einfo "Added ChangeLog entry"
fi
- #
+ #
# (Optional) Add CVS entry for all new files
#
# Add all new files to CVS
for x in ${addfiles} ; do
if [ -d ${x} ] ; then
- find ${x} | xargs echo cvs add
+ find ${x} | xargs echo cvs add
else
cvs add ${x}
fi
done
- einfo "Added ${addfiles} to CVS"
+ einfo "Added ${addfiles} to CVS"
fi
if [ ${skip} -gt 0 ] ; then
skip=$[skip-1]
else
- case ${arg} in
+ case ${arg} in
-h|--help)
print_usage
exit 0