Fix shell script line endings #22

Merged
kleb merged 1 commit from codex/feat/kInit into main 2026-04-22 07:32:33 +02:00
Owner

PR Type

Enhancement, Documentation, Configuration changes


Description

  • Add support for remote setup profile variables.

  • Update help menu with new environment variables.

  • Enforce LF line endings for shell scripts.

  • Document new passphrase and URL environment variables.


Diagram Walkthrough

flowchart LR
  subgraph Environment
    E1["KINIT_SETUP_PROFILE_URL"]
    E2["KINIT_SETUP_PASSPHRASE"]
  end
  subgraph Configuration
    G1[".gitattributes"]
  end
  E1 -- "Configures" --> K["kInit.sh"]
  E2 -- "Configures" --> K
  G1 -- "Enforces LF" --> K

File Walkthrough

Relevant files
Enhancement
kInit.sh
Update help menu with new environment variables                   

kInit.sh

  • Added help descriptions for KINIT_SETUP_PROFILE_URL,
    KINIT_SETUP_PASSPHRASE, and KUTILS_SETUP_PASSPHRASE.
  • Updated the help function to display these new environment variables
    to the user.
+105/-5 
Configuration changes
.gitattributes
Enforce LF line endings via gitattributes                               

.gitattributes

  • Created file to enforce lf line endings for .sh, .vars, and
    checksums.sha256 files.
  • Ensures cross-platform compatibility for shell script execution.
+3/-0     
Documentation
README.md
Document new setup profile environment variables                 

README.md

  • Added documentation for KINIT_SETUP_PROFILE_URL,
    KINIT_SETUP_PASSPHRASE, and KUTILS_SETUP_PASSPHRASE environment
    variables.
+32/-0   

### **PR Type** Enhancement, Documentation, Configuration changes ___ ### **Description** - Add support for remote setup profile variables. - Update help menu with new environment variables. - Enforce LF line endings for shell scripts. - Document new passphrase and URL environment variables. ___ ### Diagram Walkthrough ```mermaid flowchart LR subgraph Environment E1["KINIT_SETUP_PROFILE_URL"] E2["KINIT_SETUP_PASSPHRASE"] end subgraph Configuration G1[".gitattributes"] end E1 -- "Configures" --> K["kInit.sh"] E2 -- "Configures" --> K G1 -- "Enforces LF" --> K ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>kInit.sh</strong><dd><code>Update help menu with new environment variables</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> kInit.sh <ul><li>Added help descriptions for <code>KINIT_SETUP_PROFILE_URL</code>, <br><code>KINIT_SETUP_PASSPHRASE</code>, and <code>KUTILS_SETUP_PASSPHRASE</code>.<br> <li> Updated the help function to display these new environment variables <br>to the user.</ul> </details> </td> <td><a href="https://git.kleb.sh/kleb/kInit/src/branch/codex/feat/kInit/kInit.sh">+105/-5</a>&nbsp; </td> </tr> </table></td></tr><tr><td><strong>Configuration changes</strong></td><td><table> <tr> <td> <details> <summary><strong>.gitattributes</strong><dd><code>Enforce LF line endings via gitattributes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> .gitattributes <ul><li>Created file to enforce <code>lf</code> line endings for <code>.sh</code>, <code>.vars</code>, and <br><code>checksums.sha256</code> files.<br> <li> Ensures cross-platform compatibility for shell script execution.</ul> </details> </td> <td><a href="https://git.kleb.sh/kleb/kInit/src/branch/codex/feat/kInit/.gitattributes">+3/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>README.md</strong><dd><code>Document new setup profile environment variables</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> README.md <ul><li>Added documentation for <code>KINIT_SETUP_PROFILE_URL</code>, <br><code>KINIT_SETUP_PASSPHRASE</code>, and <code>KUTILS_SETUP_PASSPHRASE</code> environment <br>variables.</ul> </details> </td> <td><a href="https://git.kleb.sh/kleb/kInit/src/branch/codex/feat/kInit/README.md">+32/-0</a>&nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> </details> ___
kleb merged commit f9b5a1f3a5 into main 2026-04-22 07:32:33 +02:00
kleb deleted branch codex/feat/kInit 2026-04-22 07:32:34 +02:00
Collaborator

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵
🧪 No relevant tests
🔒 Security concerns

No. While the PR introduces environment variables for passphrases (KINIT_SETUP_PASSPHRASE), this is a standard practice for automation. Users should be cautioned in documentation about the risks of process environment visibility on shared systems, but the code change itself is a configuration enablement.

 Recommended focus areas for review

Variable Consistency

The help menu introduces KUTILS_SETUP_PASSPHRASE as an alternate variable. Ensure that the logic within the script (not visible in this diff) correctly prioritizes or handles both KINIT and KUTILS variants to avoid user confusion.

printf "    ${colors[YELLOW]}KINIT_SETUP_PROFILE_URL${colors[WHITE]}   - Remote setup profile URL (same as --setup-profile-url)${colors[RESET]}\n"
printf "    ${colors[YELLOW]}KINIT_SETUP_PASSPHRASE${colors[WHITE]}    - Passphrase for remote setup profile decryption${colors[RESET]}\n"
printf "    ${colors[YELLOW]}KUTILS_SETUP_PASSPHRASE${colors[WHITE]}   - Alternate passphrase variable understood by generated kUtils setup bootstraps${colors[RESET]}\n"
## PR Reviewer Guide 🔍 Here are some key observations to aid the review process: <table> <tr><td>⏱️&nbsp;<strong>Estimated effort to review</strong>: 1 🔵⚪⚪⚪⚪</td></tr> <tr><td>🧪&nbsp;<strong>No relevant tests</strong></td></tr> <tr><td>🔒&nbsp;<strong>Security concerns</strong><br><br> No. While the PR introduces environment variables for passphrases (KINIT_SETUP_PASSPHRASE), this is a standard practice for automation. Users should be cautioned in documentation about the risks of process environment visibility on shared systems, but the code change itself is a configuration enablement.</td></tr> <tr><td>⚡&nbsp;<strong>Recommended focus areas for review</strong><br><br> <details><summary><a href='https://git.kleb.sh/kleb/kInit/src/branch/refs/pull/22/head/kInit.sh#L626-L628'><strong>Variable Consistency</strong></a> The help menu introduces KUTILS_SETUP_PASSPHRASE as an alternate variable. Ensure that the logic within the script (not visible in this diff) correctly prioritizes or handles both KINIT and KUTILS variants to avoid user confusion. </summary> ```shell printf " ${colors[YELLOW]}KINIT_SETUP_PROFILE_URL${colors[WHITE]} - Remote setup profile URL (same as --setup-profile-url)${colors[RESET]}\n" printf " ${colors[YELLOW]}KINIT_SETUP_PASSPHRASE${colors[WHITE]} - Passphrase for remote setup profile decryption${colors[RESET]}\n" printf " ${colors[YELLOW]}KUTILS_SETUP_PASSPHRASE${colors[WHITE]} - Alternate passphrase variable understood by generated kUtils setup bootstraps${colors[RESET]}\n" ``` </details> </td></tr> </table>
Collaborator

PR Code Suggestions

No code suggestions found for the PR.

## PR Code Suggestions ✨ No code suggestions found for the PR.
kleb referenced this pull request from a commit 2026-06-23 17:51:09 +02:00
kleb referenced this pull request from a commit 2026-08-24 01:37:12 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kleb/kInit!22
No description provided.