The given $REPOS variable may also point to a suite, not only a codename

Reprepro accepts suite names as aliases for codenames so we should do so too.
remotes/origin/0.8
Lukas Anzinger 12 years ago committed by Michael Prokop
parent be40e3c0d8
commit 4fa841e2ca

@ -65,7 +65,7 @@ fi
(
flock --timeout 5 9 || bailout 1 "Error: could not lock file ${REPOSITORY}/conf/distributions, giving up."
if grep -q "^Codename: ${REPOS}$" "${REPOSITORY}"/conf/distributions ; then
if grep -q "^\(Codename\|Suite\): ${REPOS}$" "${REPOSITORY}"/conf/distributions ; then
echo "Codename/repository $REPOS exists already, ignoring request to add again."
exit 0
fi

@ -27,7 +27,7 @@ if ! [ -r "${REPOSITORY}/conf/distributions" ] ; then
exit 1
fi
if ! grep -q "^Codename: ${codename}$" "${REPOSITORY}/conf/distributions" ; then
if ! grep -q "^\(Codename\|Suite\): ${codename}$" "${REPOSITORY}/conf/distributions" ; then
echo "*** Codename $codename does not exist in ${REPOSITORY}/conf/distributions - nothing to do."
exit 0
fi

Loading…
Cancel
Save