chore(devops): add cross-platform runners and README; normalize EOLs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
b6dc0768e3
commit
efe0da3169
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Enforce LF for shell scripts and text files
|
||||||
|
*.sh text eol=lf
|
||||||
|
*.ps1 text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
46
README_INSTALL.md
Normal file
46
README_INSTALL.md
Normal file
@ -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.
|
||||||
16
run_installers.ps1
Normal file
16
run_installers.ps1
Normal file
@ -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"
|
||||||
|
}
|
||||||
32
run_installers.sh
Normal file
32
run_installers.sh
Normal file
@ -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
|
||||||
Loading…
Reference in New Issue
Block a user