From cb0f6fb90d1561108e2d2a99492931dfedc3066c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Healy?= Date: Mon, 20 Apr 2026 15:35:30 +0100 Subject: [PATCH] Place env vars in separate file. --- env | 8 ++++++++ git-portfolio | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 env diff --git a/env b/env new file mode 100644 index 0000000..08cd968 --- /dev/null +++ b/env @@ -0,0 +1,8 @@ +#!/usr/bin/bash +GIT_URL=https://git.seanhealy.ie +GIT_USER=sean +GITHUB_USER=seanhly +GITLAB_USER=seanhly +CODEBERG_USER=seanhly +TOKEN="$(pass gitea-api-token)" +EXCLUDE_LANGUAGES=(Makefile TeX) diff --git a/git-portfolio b/git-portfolio index f89283e..4a8411a 100755 --- a/git-portfolio +++ b/git-portfolio @@ -27,6 +27,7 @@ function cleanup() { trap cleanup EXIT directory="$1" script_dir="$(dirname "$0")" +. "$script_dir/env" if [ ! "$directory" ]; then echo "Usage: $0 " exit 1 @@ -47,13 +48,6 @@ if ! command -v quarto >/dev/null 2>&1; then echo "Error: 'quarto' command not found. Please install Quarto to render project pages." exit 1 fi -GIT_URL='https://git.seanhealy.ie' -GIT_USER=sean -GITHUB_USER=seanhly -GITLAB_USER=seanhly -CODEBERG_USER=seanhly -TOKEN="$(pass gitea-api-token)" -EXCLUDE_LANGUAGES=(Makefile TeX) function my_curl() { curl -s "$GIT_URL/api/v1/users/$GIT_USER/repos" \ -H 'Accept: application/json' \