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
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
function help () {
|
||||||
|
echo "Regenerates packaging data for the woodpecker packages."
|
||||||
|
echo "Usage: $0 <rev>"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
if [ -n "$GITHUB_TOKEN" ]; then
|
if [ -n "$GITHUB_TOKEN" ]; then
|
||||||
TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN")
|
TOKEN_ARGS=(--header "Authorization: token $GITHUB_TOKEN")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ $# -gt 1 || $1 == -* ]]; then
|
if [[ $# -gt 1 || $1 == -* ]]; then
|
||||||
echo "Regenerates packaging data for the woodpecker packages."
|
help
|
||||||
echo "Usage: $0 <rev>"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
@ -21,7 +26,7 @@ version="$1"
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [ -z "$version" ]; then
|
if [ -z "$version" ]; then
|
||||||
echo "Usage: $0 <rev>"
|
help
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Woodpecker repository
|
# Woodpecker repository
|
||||||
|
|
Loading…
Reference in a new issue