Missing REVISION before rm

This commit is contained in:
Bandie 2018-12-03 21:27:56 +01:00
parent 740a4b25f5
commit aeb7f862ef
Signed by: Bandie
GPG Key ID: C1E133BC65A822DD

View File

@ -22,7 +22,7 @@ DIRNAME="${PROJECTNAME_DEB}_$1-rev$REVISION"
FILENAME="${PROJECTNAME_DEB}_$1.rev$REVISION.orig.tar.gz"
SOURCE="https://github.com/$SOURCE/releases/download/$1/$PROJECTNAME-$1.tar.gz"
PREVVERSION=$(find . -maxdepth 1 -type d | sort -r | head -n1)
if [[ "$PREVVERSION" =~ .*$1.* ]]; then
if [[ "$PREVVERSION" =~ .*$1-rev$REVISION.* ]]; then
rm -rf *$1*
PREVVERSION=$(find . -maxdepth 1 -type d | sort -r | head -n1)
fi