For multiple versions
This commit is contained in:
parent
aeb7f862ef
commit
27de99c34b
14
launchpad-release
Executable file → Normal file
14
launchpad-release
Executable file → Normal file
@ -4,6 +4,7 @@
|
||||
# Year: 2018
|
||||
# License: GNU-GPL3
|
||||
|
||||
|
||||
# github project
|
||||
SOURCE="pampanic/pam_panic"
|
||||
|
||||
@ -15,15 +16,16 @@ if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REVISION=0001
|
||||
CODENAME="cosmic"
|
||||
REVISION=3
|
||||
PROJECTNAME=$(echo "$SOURCE" | cut -d'/' -f2)
|
||||
PROJECTNAME_DEB=$(echo "$PROJECTNAME" | sed 's/_//g')
|
||||
DIRNAME="${PROJECTNAME_DEB}_$1-rev$REVISION"
|
||||
FILENAME="${PROJECTNAME_DEB}_$1.rev$REVISION.orig.tar.gz"
|
||||
DIRNAME="${PROJECTNAME_DEB}_$1-${REVISION}${CODENAME}0"
|
||||
FILENAME="${PROJECTNAME_DEB}_$1.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-rev$REVISION.* ]]; then
|
||||
rm -rf *$1*
|
||||
if [[ "$PREVVERSION" =~ .*$1-${REVISION}${CODENAME}.* ]]; then
|
||||
rm -rf *$1-${REVISION}${CODENAME}*
|
||||
PREVVERSION=$(find . -maxdepth 1 -type d | sort -r | head -n1)
|
||||
fi
|
||||
|
||||
@ -52,7 +54,7 @@ debuild -S -sa
|
||||
cd ..
|
||||
|
||||
echo "dput to Launchpad..."
|
||||
dput "$PPA" "${PROJECTNAME_DEB}_$1.rev${REVISION}_source.changes"
|
||||
dput "$PPA" "${PROJECTNAME_DEB}_$1-${REVISION}${CODENAME}0_source.changes"
|
||||
|
||||
echo "Done!"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user