Create ~/.jrqrc config template on deploy

deploy.sh now generates a commented ~/.jrqrc template on first install
so users know what to fill in. Skips creation if the file already exists
to avoid overwriting existing credentials.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-02-26 06:49:41 -05:00
parent 6a925b83ca
commit 7db2abdf18

View File

@ -99,3 +99,29 @@ else
echo " jrq (for query wrapper)" echo " jrq (for query wrapper)"
fi fi
fi fi
# Create ~/.jrqrc template if it doesn't exist
if [ ! -f "${HOME}/.jrqrc" ]; then
echo "Creating ~/.jrqrc config template..."
cat > "${HOME}/.jrqrc" <<'EOF'
# jrq configuration
# Uncomment and fill in the values below
# JDBC connection URL (required)
# Examples:
# AS/400: jdbc:as400://hostname
# PostgreSQL: jdbc:postgresql://hostname:5432/dbname
# SQL Server: jdbc:sqlserver://hostname:1433;databaseName=mydb
#JR_URL=""
# Database credentials (required)
#JR_USER=""
#JR_PASS=""
# Output format: csv or tsv (default: csv)
#JR_FORMAT="csv"
EOF
echo "Edit ~/.jrqrc to add your connection details before using jrq"
else
echo "~/.jrqrc already exists, skipping template creation"
fi