Place env vars in separate file.

This commit is contained in:
2026-04-20 15:35:30 +01:00
parent aea4b209d7
commit cb0f6fb90d
2 changed files with 9 additions and 7 deletions

8
env Normal file
View File

@@ -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)

View File

@@ -27,6 +27,7 @@ function cleanup() {
trap cleanup EXIT trap cleanup EXIT
directory="$1" directory="$1"
script_dir="$(dirname "$0")" script_dir="$(dirname "$0")"
. "$script_dir/env"
if [ ! "$directory" ]; then if [ ! "$directory" ]; then
echo "Usage: $0 <directory>" echo "Usage: $0 <directory>"
exit 1 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." echo "Error: 'quarto' command not found. Please install Quarto to render project pages."
exit 1 exit 1
fi 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() { function my_curl() {
curl -s "$GIT_URL/api/v1/users/$GIT_USER/repos" \ curl -s "$GIT_URL/api/v1/users/$GIT_USER/repos" \
-H 'Accept: application/json' \ -H 'Accept: application/json' \