From efe0da31697ba64c50388350268ce088b299f819 Mon Sep 17 00:00:00 2001 From: Saravanakumar D Date: Fri, 29 May 2026 21:26:47 -0700 Subject: [PATCH] chore(devops): add cross-platform runners and README; normalize EOLs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitattributes | 4 ++++ README_INSTALL.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ run_installers.ps1 | 16 ++++++++++++++++ run_installers.sh | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 .gitattributes create mode 100644 README_INSTALL.md create mode 100644 run_installers.ps1 create mode 100644 run_installers.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfa8698 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# Enforce LF for shell scripts and text files +*.sh text eol=lf +*.ps1 text eol=lf +*.md text eol=lf diff --git a/README_INSTALL.md b/README_INSTALL.md new file mode 100644 index 0000000..728a700 --- /dev/null +++ b/README_INSTALL.md @@ -0,0 +1,46 @@ +Installation guide — learning_ai_devops_tools + +Purpose + +This repository contains interactive, safe installers and helpers to install CLI tools (Claude Code, OpenAI Codex, Antigravity agy, Devin, GitHub Copilot) on WSL/Ubuntu, macOS, and Windows. + +Files of interest + +- install_clis_wsl.sh — interactive WSL installer (WSL/Ubuntu). Preview and confirm before running remote installers. +- make_symlinks_wsl.sh — creates /usr/local/bin symlinks (requires sudo) +- run_installers.sh — cross-platform wrapper to run installers from WSL or show instructions +- run_installers.ps1 — Windows PowerShell wrapper to run WSL or show Windows-native steps +- cli-install-report.md — generated report of installs (example) + +Quick start (WSL/Ubuntu) + +1. Open WSL (Ubuntu) shell. +2. cd /mnt/d/SANDBOX/mygh/learning_ai_devops_tools +3. Ensure scripts use LF and are executable: + sudo apt-get update && sudo apt-get install -y dos2unix + dos2unix install_clis_wsl.sh run_installers.sh make_symlinks_wsl.sh || true + chmod +x install_clis_wsl.sh run_installers.sh make_symlinks_wsl.sh +4. Run the interactive installer (will preview each remote installer and ask confirmation): + bash -i ./install_clis_wsl.sh + +Quick start (Windows PowerShell with WSL) + +- From PowerShell run (recommended): + wsl bash -ic "cd /mnt/d/SANDBOX/mygh/learning_ai_devops_tools && dos2unix install_clis_wsl.sh || true && bash -i ./install_clis_wsl.sh" + +Quick start (macOS) + +- Inspect installers first. macOS support is similar to Linux; use the run_installers.sh wrapper to list commands. Do NOT pipe unknown scripts to shell without review. + +Security and safety + +- All remote installers are previewed before execution. +- No secrets or API keys are written to shell profiles. +- Auth steps are left interactive (use the tool's login commands). + +Developer notes + +- Use .gitattributes to enforce LF endings on shell scripts across platforms. +- To reproduce: run the scripts from a fresh WSL Ubuntu session and follow interactive prompts. + +If you want, run './run_installers.sh' to get an interactive cross-platform flow. diff --git a/run_installers.ps1 b/run_installers.ps1 new file mode 100644 index 0000000..ac4a774 --- /dev/null +++ b/run_installers.ps1 @@ -0,0 +1,16 @@ +<# +PowerShell wrapper to launch the WSL installer or show platform-specific instructions. +Usage: .\run_installers.ps1 [-Preview] +#> +param([switch]$Preview) + +Write-Host "Running cross-platform installer helper" +if (Get-Command wsl -ErrorAction SilentlyContinue) { + if ($Preview) { + wsl bash -lc 'sed -n "1,120p" /mnt/d/SANDBOX/mygh/learning_ai_devops_tools/install_clis_wsl.sh' + } else { + wsl bash -ic "cd /mnt/d/SANDBOX/mygh/learning_ai_devops_tools && bash -i ./install_clis_wsl.sh" + } +} else { + Write-Host "WSL not found. Please run manually on the target platform according to README_INSTALL.md" +} diff --git a/run_installers.sh b/run_installers.sh new file mode 100644 index 0000000..46e1e98 --- /dev/null +++ b/run_installers.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Cross-platform wrapper to run installers or show instructions. +# Usage: ./run_installers.sh [--preview] + +PREVIEW=0 +if [ "${1:-}" = "--preview" ]; then PREVIEW=1; fi + +is_wsl() { + grep -qi microsoft /proc/version 2>/dev/null || grep -qi microsoft /proc/sys/kernel/osrelease 2>/dev/null +} + +echo "Cross-platform installer helper" +if is_wsl; then + echo "Detected WSL/Ubuntu environment." + if [ "$PREVIEW" -eq 1 ]; then + echo "Preview mode: showing installers to be executed by install_clis_wsl.sh" + sed -n '1,120p' install_clis_wsl.sh + exit 0 + fi + read -rp "Run the interactive WSL installer (install_clis_wsl.sh)? [y/N]: " ans + case "$ans" in + [Yy]*) bash -i ./install_clis_wsl.sh ;; + *) echo "Cancelled by user."; exit 0 ;; + esac +else + echo "Not in WSL. Recommended flows:" + echo "- Run this from Windows PowerShell using WSL: wsl bash -ic 'cd /mnt/d/SANDBOX/mygh/learning_ai_devops_tools && bash -i ./install_clis_wsl.sh'" + echo "- On macOS or Linux, inspect install_clis_wsl.sh and run it in a bash login shell after review." + exit 0 +fi