From 16da0f0c659fa60e1179e0e3d2b1299e782a98b7 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Thu, 16 Mar 2023 01:14:34 +0300 Subject: [PATCH] pkgs/woodpecker: add help function --- packages/woodpecker/update.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/woodpecker/update.sh b/packages/woodpecker/update.sh index 48f362f..b60e850 100755 --- a/packages/woodpecker/update.sh +++ b/packages/woodpecker/update.sh @@ -3,14 +3,19 @@ # shellcheck shell=bash +function help () { + echo "Regenerates packaging data for the woodpecker packages." + echo "Usage: $0 " + exit 1 +} + if [ -n "$GITHUB_TOKEN" ]; then TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN") fi + if [[ $# -gt 1 || $1 == -* ]]; then - echo "Regenerates packaging data for the woodpecker packages." - echo "Usage: $0 " - exit 1 + help fi set -x @@ -21,7 +26,7 @@ version="$1" set -euo pipefail if [ -z "$version" ]; then - echo "Usage: $0 " + help fi # Woodpecker repository