Support old repoman versions.
If repoman doesn't support '-a', drop it and ask before calling it.
This commit is contained in:
parent
94e04f960c
commit
fd1dc7ae28
@ -4,13 +4,17 @@
|
|||||||
# Released under the terms of the 3-clause BSD license.
|
# Released under the terms of the 3-clause BSD license.
|
||||||
|
|
||||||
# Few output helpers.
|
# Few output helpers.
|
||||||
die() {
|
say() {
|
||||||
echo "${@}" >&2
|
echo "${@}" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
die() {
|
||||||
|
say "${@}"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
sayv() {
|
sayv() {
|
||||||
[ -n "${SC_VERBOSE}" ] && echo "${@}" >&2
|
[ -n "${SC_VERBOSE}" ] && say "${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
req() {
|
req() {
|
||||||
@ -159,8 +163,36 @@ main() {
|
|||||||
vcs_status
|
vcs_status
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# Do we have repoman new enough?
|
||||||
|
local old_repoman
|
||||||
|
repoman --version -a >/dev/null 2>&1
|
||||||
|
if [ $? -eq 2 ]; then
|
||||||
|
old_repoman=
|
||||||
|
|
||||||
|
say 'Please update portage to newer version in order to have repoman supporting'
|
||||||
|
say "--ask option and thus delay the following question until after 'repoman full'."
|
||||||
|
say
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
local answ
|
||||||
|
printf '%s' 'Commit changes? [Yes/No] ' >&2
|
||||||
|
read answ
|
||||||
|
|
||||||
|
case "${answ}" in
|
||||||
|
[yY]|[yY][eE]|[yY][eE][sS])
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
[nN]|[nN][oO])
|
||||||
|
die 'Aborting.'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
say "Response '${answ}' not understood, try again."
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
sayv "Now, let's let repoman do its job..."
|
sayv "Now, let's let repoman do its job..."
|
||||||
exec repoman commit -a -m "${SC_CP}: ${commitmsg}"
|
exec repoman commit ${old_repoman--a} -m "${SC_CP}: ${commitmsg}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user