r2pm: Support cleaning of package cloned to <package>.git (#17357)

This commit is contained in:
Khairul Azhar Kasmiran 2020-07-27 12:24:16 +08:00 committed by GitHub
parent eac93216ec
commit 0f0ffee510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -584,8 +584,11 @@ case "$1" in
if [ -d "${R2PM_GITDIR}/$2" ]; then
echo "Cleaning up ${R2PM_GITDIR}/$2..."
rm -rf "${R2PM_GITDIR}/$2"
elif [ -d "${R2PM_GITDIR}/$2.git" ]; then
echo "Cleaning up ${R2PM_GITDIR}/$2.git..."
rm -rf "${R2PM_GITDIR}/$2.git"
else
echo "Cannot find $2 in ${R2PM_GITDIR}"
echo "Cannot find $2 or $2.git in ${R2PM_GITDIR}"
RC=1
fi
shift