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
|
# Year: 2018
|
||||||
# License: GNU-GPL3
|
# License: GNU-GPL3
|
||||||
|
|
||||||
|
|
||||||
# github project
|
# github project
|
||||||
SOURCE="pampanic/pam_panic"
|
SOURCE="pampanic/pam_panic"
|
||||||
|
|
||||||
@ -15,15 +16,16 @@ if [ -z "$1" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REVISION=0001
|
CODENAME="cosmic"
|
||||||
|
REVISION=3
|
||||||
PROJECTNAME=$(echo "$SOURCE" | cut -d'/' -f2)
|
PROJECTNAME=$(echo "$SOURCE" | cut -d'/' -f2)
|
||||||
PROJECTNAME_DEB=$(echo "$PROJECTNAME" | sed 's/_//g')
|
PROJECTNAME_DEB=$(echo "$PROJECTNAME" | sed 's/_//g')
|
||||||
DIRNAME="${PROJECTNAME_DEB}_$1-rev$REVISION"
|
DIRNAME="${PROJECTNAME_DEB}_$1-${REVISION}${CODENAME}0"
|
||||||
FILENAME="${PROJECTNAME_DEB}_$1.rev$REVISION.orig.tar.gz"
|
FILENAME="${PROJECTNAME_DEB}_$1.orig.tar.gz"
|
||||||
SOURCE="https://github.com/$SOURCE/releases/download/$1/$PROJECTNAME-$1.tar.gz"
|
SOURCE="https://github.com/$SOURCE/releases/download/$1/$PROJECTNAME-$1.tar.gz"
|
||||||
PREVVERSION=$(find . -maxdepth 1 -type d | sort -r | head -n1)
|
PREVVERSION=$(find . -maxdepth 1 -type d | sort -r | head -n1)
|
||||||
if [[ "$PREVVERSION" =~ .*$1-rev$REVISION.* ]]; then
|
if [[ "$PREVVERSION" =~ .*$1-${REVISION}${CODENAME}.* ]]; then
|
||||||
rm -rf *$1*
|
rm -rf *$1-${REVISION}${CODENAME}*
|
||||||
PREVVERSION=$(find . -maxdepth 1 -type d | sort -r | head -n1)
|
PREVVERSION=$(find . -maxdepth 1 -type d | sort -r | head -n1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ debuild -S -sa
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo "dput to Launchpad..."
|
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!"
|
echo "Done!"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user