mirror of
https://github.com/d0zingcat/ghost-docker.git
synced 2026-05-13 23:16:44 +00:00
- Unfortunately the TB CLI doesn't just output the token and instead tries to copy it to the clipboard - Since we're running inside a container we can't do that, so need to just update the docs to get it from the UI
24 lines
573 B
Bash
Executable File
24 lines
573 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# If arguments are provided, run tb command with those arguments
|
|
if [[ $# -gt 0 ]]; then
|
|
# Check if logged in first
|
|
if [[ ! -f "/home/tinybird/.tinyb" ]]; then
|
|
echo "Not logged in to Tinybird. Please run 'docker compose run --rm tinybird-login' first"
|
|
exit 1
|
|
fi
|
|
# Run the tb command with provided arguments
|
|
exec tb "$@"
|
|
fi
|
|
|
|
# Default behavior: login
|
|
# Check if already logged in
|
|
if [[ -f "/home/tinybird/.tinyb" ]]
|
|
then
|
|
echo "Tinybird already logged in"
|
|
exit 0
|
|
fi
|
|
|
|
# Login to Tinybird
|
|
tb login --method code
|