From 09a88c17ea970eaa6fb2a08e154657b6cc052b62 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 17 Aug 2023 10:53:11 +0200 Subject: [PATCH] allow env var overwrite --- shell/gh-repo.sh | 5 +++-- shell/gitea-batchmerge.sh | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) mode change 100644 => 100755 shell/gitea-batchmerge.sh diff --git a/shell/gh-repo.sh b/shell/gh-repo.sh index af69115..ea31405 100755 --- a/shell/gh-repo.sh +++ b/shell/gh-repo.sh @@ -5,9 +5,10 @@ set -eo pipefail me=$(basename "$0") +dist="dist/${me%.*}" -GH_REPO_ORGS="example" -GH_REPO_DIST="dist/${me%.*}" +GH_REPO_ORGS="${GH_REPO_ORGS:-example}" +GH_REPO_DIST="${GH_REPO_DIST:-$dist}" mkdir -p "${GH_REPO_DIST}" diff --git a/shell/gitea-batchmerge.sh b/shell/gitea-batchmerge.sh old mode 100644 new mode 100755 index d169ff1..af284d3 --- a/shell/gitea-batchmerge.sh +++ b/shell/gitea-batchmerge.sh @@ -4,10 +4,10 @@ set -eo pipefail -GITEA_SERVER=https://gitea.example.com -GITEA_TOKEN=my-private-token -GITEA_USER="gitea" -GITEA_PR_TITLE= +GITEA_SERVER="${GITEA_SERVER:-https://gitea.example.com}" +GITEA_TOKEN="${GITEA_TOKEN:-my-private-token}" +GITEA_USER="${GITEA_USER:-gitea}" +GITEA_PR_TITLE="${GITEA_PR_TITLE:-}" http "${GITEA_SERVER}/api/v1/user" 'Authorization:token '"${GITEA_TOKEN}"''