mirror of
https://github.com/joshuadavidthomas/dotfiles.git
synced 2025-08-04 18:18:13 +00:00
only run if not logged in
This commit is contained in:
parent
b0e3dade77
commit
ace03c1b48
1 changed files with 22 additions and 16 deletions
|
@ -59,24 +59,30 @@ else
|
|||
fi
|
||||
|
||||
echo
|
||||
gum style --foreground="#00d1b2" --bold "Atuin Configuration"
|
||||
echo "Please enter your Atuin credentials (or press Enter to skip):"
|
||||
echo "Note: These will only be used during this bootstrap session"
|
||||
|
||||
ATUIN_PASSWORD=$(gum input --placeholder "Atuin password" --password --width 60)
|
||||
|
||||
if [[ -n "$ATUIN_PASSWORD" ]]; then
|
||||
ATUIN_KEY=$(gum input --placeholder "Atuin key" --width 60)
|
||||
|
||||
if [[ -n "$ATUIN_KEY" ]]; then
|
||||
export ATUIN_PASSWORD
|
||||
export ATUIN_KEY
|
||||
echo "✓ Atuin credentials collected (in memory only)"
|
||||
else
|
||||
echo "⚠ Atuin key not provided, skipping Atuin configuration"
|
||||
fi
|
||||
# Check if Atuin is already logged in
|
||||
if command -v atuin &>/dev/null && atuin status &>/dev/null && atuin status 2>&1 | grep -q "Username:"; then
|
||||
echo "✓ Atuin already logged in"
|
||||
else
|
||||
echo "⚠ Skipping Atuin configuration"
|
||||
gum style --foreground="#00d1b2" --bold "Atuin Configuration"
|
||||
echo "Please enter your Atuin credentials (or press Enter to skip):"
|
||||
echo "Note: These will only be used during this bootstrap session"
|
||||
|
||||
ATUIN_PASSWORD=$(gum input --placeholder "Atuin password" --password --width 60)
|
||||
|
||||
if [[ -n "$ATUIN_PASSWORD" ]]; then
|
||||
ATUIN_KEY=$(gum input --placeholder "Atuin key" --width 60)
|
||||
|
||||
if [[ -n "$ATUIN_KEY" ]]; then
|
||||
export ATUIN_PASSWORD
|
||||
export ATUIN_KEY
|
||||
echo "✓ Atuin credentials collected (in memory only)"
|
||||
else
|
||||
echo "⚠ Atuin key not provided, skipping Atuin configuration"
|
||||
fi
|
||||
else
|
||||
echo "⚠ Skipping Atuin configuration"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue