From debbafa17104250ff3b2b76f9bad455c63b112bc Mon Sep 17 00:00:00 2001 From: BlubbFish Date: Wed, 19 Jan 2022 21:34:13 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9Edeb/control-build.sh=E2=80=9C=20=C3=A4?= =?UTF-8?q?ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deb/control-build.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/deb/control-build.sh b/deb/control-build.sh index c910999..3096d05 100644 --- a/deb/control-build.sh +++ b/deb/control-build.sh @@ -5,56 +5,56 @@ usage() { echo "usage: " \ "NAME=app " \ "PLATFORM=amd64 " \ - "DEPENDENCIES=\"libc-bin (>= 2.19)\" " \ "MAINAINER=\"Test \" " \ "DESCRIPTION=Testapp " \ "VERSION=1.0-0 " \ + "[DEPENDENCIES=\"libc-bin (>= 2.19)\"] " \ "sh control-build.sh" exit 1 } -echo "DEB Builder control-file: https://github.com/linksmart/ci-scripts/blob/master/deb/control-build.sh" +echo "DEB Builder control-file: https://git.blubbfish.net/vs_utils/CI-Scripts/src/branch/master/deb/control-build.sh" -if [[ -z "$NAME" ]]; then +if [[ -z "${NAME}" ]]; then usage fi -if [[ -z "$PLATFORM" ]]; then +if [[ -z "${PLATFORM}" ]]; then usage fi -if [[ -z "$MAINAINER" ]]; then +if [[ -z "${MAINAINER}" ]]; then usage fi -if [[ -z "$DESCRIPTION" ]]; then +if [[ -z "${DESCRIPTION}" ]]; then usage fi -if [[ -z "$VERSION" ]]; then +if [[ -z "${VERSION}" ]]; then usage fi re='^[^0-9]*([0-9]+.*)$' -if [[ $VERSION =~ $re ]]; then +if [[ ${VERSION} =~ $re ]]; then VERSION=${BASH_REMATCH[1]} else echo "could not found a number in string"; - VERSION="0.0.0+"$BUILDNUMBER + VERSION="0.0.0+"${BUILDNUMBER} - if [[ -z "$BUILDNUMBER" ]]; then + if [[ -z "${BUILDNUMBER}" ]]; then echo "you also not provide a valid buildnumner BUILDNUMBER=123" usage fi fi -echo "Package: $NAME" > control -echo "Version: $VERSION" >> control +echo "Package: ${NAME}" > control +echo "Version: ${VERSION}" >> control echo "Section: base" >> control echo "Priority: optional" >> control -echo "Architecture: $PLATFORM" >> control -if [[ -n "$DEPENDENCIES" ]]; then - echo "Depends: $DEPENDENCIES" >> control +echo "Architecture: ${PLATFORM}" >> control +if [[ -n "${DEPENDENCIES}" ]]; then + echo "Depends: ${DEPENDENCIES}" >> control fi -echo "Maintainer: $MAINAINER" >> control -echo "Description: $DESCRIPTION" >> control \ No newline at end of file +echo "Maintainer: ${MAINAINER}" >> control +echo "Description: ${DESCRIPTION}" >> control \ No newline at end of file