From 7db2abdf185298f395db35d1636c6f9a9655697d Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 26 Feb 2026 06:49:41 -0500 Subject: [PATCH] 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 --- deploy.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/deploy.sh b/deploy.sh index a9e790a..a1898b2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -99,3 +99,29 @@ else echo " jrq (for query wrapper)" 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