pkgs/woodpecker: add help function
This commit is contained in:
parent
09bd9e8e9e
commit
16da0f0c65
1 changed files with 9 additions and 4 deletions
|
@ -3,14 +3,19 @@
|
|||
|
||||
# shellcheck shell=bash
|
||||
|
||||
function help () {
|
||||
echo "Regenerates packaging data for the woodpecker packages."
|
||||
echo "Usage: $0 <rev>"
|
||||
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 <rev>"
|
||||
exit 1
|
||||
help
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
@ -21,7 +26,7 @@ version="$1"
|
|||
set -euo pipefail
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
echo "Usage: $0 <rev>"
|
||||
help
|
||||
fi
|
||||
|
||||
# Woodpecker repository
|
||||
|
|
Loading…
Reference in a new issue