diff --git a/NECESSARY.md b/NECESSARY.md index 9b1975e..191e6f1 100644 --- a/NECESSARY.md +++ b/NECESSARY.md @@ -17,6 +17,7 @@ ### πŸ› οΈ 3. 개발 μœ ν‹Έλ¦¬ν‹° * **[lazygit](https://github.com/jesseduffield/lazygit)** - Git 버전 관리λ₯Ό ν‚€λ³΄λ“œλ‘œ λŠ₯μˆ™ν•˜κ²Œ μ œμ–΄ν•˜λŠ” μ‹œκ°μ  TUI * **[uv](https://docs.astral.sh/uv/)** - μ΄ˆκ³ μ† Rust 기반 Python νŒ¨ν‚€μ§€ & ν”„λ‘œμ νŠΈ 톡합 κ΄€λ¦¬μž +* **[VSCodium (codium)](https://vscodium.com/)** - VS Codeμ—μ„œ νŒŒμƒλ˜μ—ˆμœΌλ‚˜ 원격 μΈ‘μ •(Telemetry)·좔적기·독점 μš”μ†Œλ₯Ό μ œκ±°ν•˜κ³  μ΅œμ†Œν•œμ˜ ν•„μš”ν•œ 핡심 κΈ°λŠ₯만 남긴 순수 μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œ 에디터 ### πŸ€– 4. AI 개발 μ—μ΄μ „νŠΈ & λ„μš°λ―Έ * **[Antigravity CLI (agy)](https://antigravity.google)** - Antigravity 2.0 ν”Œλž«νΌμ˜ κ²½λŸ‰ν™” 터미널 μ½”λ”© μ—μ΄μ „νŠΈ CLI @@ -52,6 +53,9 @@ curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazy # uv curl -LsSf https://astral.sh/uv/install.sh | sh +# VSCodium (codium) +curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-codium.sh?ref_type=heads" | bash + # 4. AI 개발 μ—μ΄μ „νŠΈ & λ„μš°λ―Έ # Antigravity CLI (agy) curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-agy.sh?ref_type=heads" | bash @@ -126,6 +130,16 @@ curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-grap irm https://astral.sh/uv/install.ps1 | iex ``` +* **VSCodium (codium):** + * **CMD:** + ```cmd + powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-codium.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-codium.ps1' -OutFile $t; & $t" + ``` + * **PowerShell:** + ```powershell + $t="$env:TEMP\install-codium.ps1"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-codium.ps1' -OutFile $t; powershell -ExecutionPolicy Bypass -File $t + ``` + #### 4. AI 개발 μ—μ΄μ „νŠΈ & λ„μš°λ―Έ * **Antigravity CLI (agy):** * **CMD:** @@ -252,23 +266,33 @@ uv tool install # λ…λ¦½λœ CLI 도ꡬ κΈ€λ‘œλ²Œ μ„€μΉ˜ --- -### 6. AI 개발 μ—μ΄μ „νŠΈ (Antigravity, Claude, Codex) +### 6. VSCodium (codium) +VS Codeμ—μ„œ μΆœλ°œν–ˆμœΌλ‚˜ 원격 μΈ‘μ •(Telemetry)·좔적기·독점 μš”μ†Œλ₯Ό λͺ¨λ‘ κ±·μ–΄λ‚΄κ³  **κ°œλ°œμ— κΌ­ ν•„μš”ν•œ μ΅œμ†Œν•œμ˜ 핡심 κΈ°λŠ₯만 남긴 순수 μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œ 에디터**μž…λ‹ˆλ‹€. +```bash +codium . # ν˜„μž¬ 디렉토리λ₯Ό VSCodium으둜 μ—΄κΈ° +codium # νŠΉμ • 파일 λ°”λ‘œ μ—΄κΈ° +codium --install-extension # Open VSX ν™•μž₯ ν”ŒλŸ¬κ·ΈμΈ μ„€μΉ˜ +``` -#### 6.1. Antigravity CLI (agy) +--- + +### 7. AI 개발 μ—μ΄μ „νŠΈ (Antigravity, Claude, Codex) + +#### 7.1. Antigravity CLI (agy) Google DeepMind의 Antigravity ν”Œλž«νΌ 터미널 μ½”λ”© μ—μ΄μ „νŠΈμž…λ‹ˆλ‹€. ```bash agy # λŒ€ν™”ν˜• μ½”λ”© μ„Έμ…˜ μ‹œμž‘ agy -p "μž‘μ—… λ‚΄μš©" # λ‹¨λ°œμ„± ν”„λ‘¬ν”„νŠΈ μ‹€ν–‰ ``` -#### 6.2. Claude Code +#### 7.2. Claude Code Anthropic의 곡식 터미널 기반 λŒ€ν™”ν˜• μ½”λ”© μ–΄μ‹œμŠ€ν„΄νŠΈμž…λ‹ˆλ‹€. ```bash claude # λŒ€ν™”ν˜• μ½”λ”© μ„Έμ…˜ μ‹œμž‘ claude -p "μž‘μ—… λ‚΄μš©" # λ‹¨λ°œμ„± ν”„λ‘¬ν”„νŠΈ μ‹€ν–‰ ``` -#### 6.3. Codex CLI +#### 7.3. Codex CLI OpenAI의 곡식 터미널 기반 둜컬 λŒ€ν™”ν˜• μ½”λ”© μ—μ΄μ „νŠΈμž…λ‹ˆλ‹€. ```bash codex auth # 인증 둜그인 @@ -278,7 +302,7 @@ codex -p "μž‘μ—… λ‚΄μš©" # λ‹¨λ°œμ„± λΉŒλ“œ/μˆ˜μ • μ§€μ‹œ --- -### 7. graphify +### 8. graphify μ½”λ“œλ² μ΄μŠ€μ™€ λ¬Έμ„œλ₯Ό 지식 κ·Έλž˜ν”„(Knowledge Graph)둜 μΈλ±μ‹±ν•˜μ—¬ λ³΅μž‘ν•œ ν”„λ‘œμ νŠΈ ꡬ쑰λ₯Ό λΉ λ₯΄κ²Œ λΆ„μ„ν•˜κ³  μ§ˆλ¬Έμ— μ •λ°€ν•˜κ²Œ λ‹΅ν•˜λ„λ‘ λ•λŠ” λ„κ΅¬μž…λ‹ˆλ‹€. ```bash graphify . # ν˜„μž¬ ν”„λ‘œμ νŠΈ κ·Έλž˜ν”„ λΉŒλ“œ/κ°±μ‹  diff --git a/README.md b/README.md index de3a8c7..837d337 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ ### πŸ› οΈ 3. 개발 μœ ν‹Έλ¦¬ν‹° & μ›Ή 터미널 * **[lazygit](https://github.com/jesseduffield/lazygit)** - Git 버전 관리λ₯Ό ν‚€λ³΄λ“œλ‘œ λŠ₯μˆ™ν•˜κ²Œ μ œμ–΄ν•˜λŠ” μ‹œκ°μ  TUI * **[uv](https://docs.astral.sh/uv/)** - μ΄ˆκ³ μ† Rust 기반 Python νŒ¨ν‚€μ§€ & ν”„λ‘œμ νŠΈ 톡합 κ΄€λ¦¬μž +* **[VSCodium (codium)](https://vscodium.com/)** - VS Code μ˜€ν”ˆμ†ŒμŠ€μ—μ„œ 원격 μΈ‘μ •(Telemetry)·좔적기·독점 μš”μ†Œλ₯Ό λͺ¨λ‘ λœμ–΄λ‚΄κ³  κ°œλ°œμ— κΌ­ ν•„μš”ν•œ μ΅œμ†Œν•œμ˜ 핡심 κΈ°λŠ₯만 남긴 순수 μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œ 에디터 ### πŸ€– 4. AI 개발 μ—μ΄μ „νŠΈ (AI Agents) * **[Antigravity CLI (agy)](https://antigravity.google)** - Antigravity 2.0 ν”Œλž«νΌμ˜ κ²½λŸ‰ν™” 터미널 μ½”λ”© μ—μ΄μ „νŠΈ CLI @@ -112,6 +113,11 @@ > source ~/.bashrc > ``` +* **VSCodium (codium):** + ```bash + curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-codium.sh?ref_type=heads" | bash + ``` + #### πŸ€– 4. AI 개발 μ—μ΄μ „νŠΈ (AI Agents) * **Antigravity CLI (agy):** @@ -284,6 +290,16 @@ > [System.Environment]::SetEnvironmentVariable('Path', $env:USERPROFILE + '\.local\bin;' + [System.Environment]::GetEnvironmentVariable('Path', 'User'), 'User') > ``` +* **VSCodium (codium):** + * **CMD μ°½μ—μ„œ μ„€μΉ˜ μ‹œ:** + ```cmd + powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-codium.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-codium.ps1' -OutFile $t; & $t" + ``` + * **νŒŒμ›Œμ‰˜ μ°½μ—μ„œ μ„€μΉ˜ μ‹œ:** + ```powershell + $t="$env:TEMP\install-codium.ps1"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-codium.ps1' -OutFile $t; powershell -ExecutionPolicy Bypass -File $t + ``` + #### πŸ€– 4. AI 개발 μ—μ΄μ „νŠΈ (AI Agents) * **Antigravity CLI (agy):** @@ -605,6 +621,30 @@ lazygit # 가동 λͺ…λ Ήμ–΄ | `P` / `p` | 원격 μ €μž₯μ†Œμ— Push / Pull μš”μ²­ μ‹€ν–‰ | | `?` | 전체 단좕킀 치트 μ‹œνŠΈ 일람 λ‘œλ“œ | +#### 3.2. uv +Rust둜 μž‘μ„±λœ μ΄ˆκ³ μ† μ°¨μ„ΈλŒ€ Python νŒ¨ν‚€μ§€ 및 ν”„λ‘œμ νŠΈ 톡합 관리 λ„κ΅¬μž…λ‹ˆλ‹€. 기쑴의 `pip`, `pip-tools`, `virtualenv`, `pyenv`, `pipx`, `poetry`λ₯Ό 단 ν•˜λ‚˜μ˜ 단일 λ°”μ΄λ„ˆλ¦¬λ‘œ μ™„λ²½νžˆ λŒ€μ²΄ν•˜λ©° 10~100λ°° λΉ λ₯Έ 속도λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€. + +```bash +uv venv # ν˜„μž¬ 폴더에 κ°€μƒν™˜κ²½(.venv) μ΄ˆκ³ μ† 생성 +uv pip install # κ°€μƒν™˜κ²½μ— νŒ¨ν‚€μ§€ μ„€μΉ˜ +uv run # κ°€μƒν™˜κ²½μ„ μžλ™ κ΅¬μ„±ν•˜μ—¬ 슀크립트 μ‹€ν–‰ +uv tool install # CLI 도ꡬλ₯Ό 격리된 ν™˜κ²½μ— κΈ€λ‘œλ²Œ μ„€μΉ˜ +``` + +#### 3.3. VSCodium (codium) +Microsoft의 **Visual Studio Code(VS Code) μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œλ² μ΄μŠ€μ—μ„œ 좜발**ν–ˆμœΌλ‚˜, Microsoft의 독점 λΌμ΄μ„ μŠ€ λž˜νΌΒ·μ›κ²© μΈ‘μ •(Telemetry)Β·μ‚¬μš©μž 좔적(Tracking) 및 λΆˆν•„μš”ν•œ λΆ€κ°€ μš”μ†Œλ₯Ό μ™„μ „νžˆ κ±·μ–΄λ‚΄κ³  **κ°œλ°œμ— κΌ­ ν•„μš”ν•œ μ΅œμ†Œν•œμ˜ 핡심 에디터 κΈ°λŠ₯만 남긴 순수 μ˜€ν”ˆμ†ŒμŠ€(MIT λΌμ΄μ„ μŠ€) μ½”λ“œ 에디터**μž…λ‹ˆλ‹€. + +* **VS Code 기반의 μΉœμˆ™ν•¨κ³Ό μ™„λ²½ν•œ ν˜Έν™˜μ„±** β€” VS Code와 λ™μΌν•œ 에디터 μ½”μ–΄, 단좕킀, UI, 디버거, Git 톡합 ν™˜κ²½μ„ κ·ΈλŒ€λ‘œ 제곡 +* **μ΅œμ†Œν•œμ˜ 핡심 μš”μ†Œλ§Œ νƒ‘μž¬ (Zero Telemetry)** β€” λ°±κ·ΈλΌμš΄λ“œ 데이터 μˆ˜μ§‘μ΄λ‚˜ λΆˆν•„μš”ν•œ 독점 μ„œλΉ„μŠ€ 연동 없이 가볍고 κΉ¨λ—ν•˜κ²Œ λ™μž‘ +* **μ˜€ν”ˆμ†ŒμŠ€ λ§ˆμΌ“ν”Œλ ˆμ΄μŠ€(Open VSX) κΈ°λ³Έ 연동** β€” 독점 λ§ˆμΌ“ν”Œλ ˆμ΄μŠ€ λŒ€μ‹  κ°œλ°©ν˜• ν™•μž₯ μƒνƒœκ³„μΈ [Open VSX Registry](https://open-vsx.org/)λ₯Ό κΈ°λ³Έ μ‚¬μš©ν•˜μ—¬ ν•„μš”ν•œ ν™•μž₯ κΈ°λŠ₯만 κΉ”λ”ν•˜κ²Œ μ„€μΉ˜ κ°€λŠ₯ + +```bash +codium . # ν˜„μž¬ 디렉토리λ₯Ό VSCodium으둜 μ—΄κΈ° +codium # νŠΉμ • 파일 λ°”λ‘œ μ—΄κΈ° +codium --install-extension # ν™•μž₯ ν”ŒλŸ¬κ·ΈμΈ μ„€μΉ˜ +codium --list-extensions # μ„€μΉ˜λœ ν™•μž₯ ν”ŒλŸ¬κ·ΈμΈ λͺ©λ‘ 확인 +``` + --- ### πŸ€– 4. AI 개발 μ—μ΄μ „νŠΈ (AI Agents) diff --git a/VIBE-WORK/261104/INSTALL-CODIUM-IMP-PLAN.md b/VIBE-WORK/261104/INSTALL-CODIUM-IMP-PLAN.md new file mode 100644 index 0000000..1ef5706 --- /dev/null +++ b/VIBE-WORK/261104/INSTALL-CODIUM-IMP-PLAN.md @@ -0,0 +1,40 @@ +# VSCodium (codium) μ„€μΉ˜ 슀크립트 및 λ¬Έμ„œ μΆ”κ°€ κ³„νš (INSTALL-CODIUM-IMP-PLAN) + +## 1. κ°œμš” +Visual Studio Code(VS Code)의 μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œλ² μ΄μŠ€μ—μ„œ λ§ˆμ΄ν¬λ‘œμ†Œν”„νŠΈμ˜ 원격 μΈ‘μ •(Telemetry)/νŠΈλž˜ν‚Ή 및 λΆˆν•„μš”ν•œ 독점 μš”μ†Œλ₯Ό μ™„μ „νžˆ μ œκ±°ν•˜κ³  **κ°œλ°œμ— κΌ­ ν•„μš”ν•œ 순수 핡심 κΈ°λŠ₯만 남긴 κ²½λŸ‰ μ˜€ν”ˆμ†ŒμŠ€ λ°”μ΄λ„ˆλ¦¬ 에디터 `VSCodium (codium)`**의 크둜슀 ν”Œλž«νΌ μžλ™ μ„€μΉ˜ 슀크립트(`install-codium.sh`, `install-codium.ps1`)λ₯Ό μ œμž‘ν•˜κ³  `README.md` 및 `NECESSARY.md` λ¬Έμ„œμ— λ°˜μ˜ν•©λ‹ˆλ‹€. + +```mermaid +flowchart TD + Start([install-codium μ‹€ν–‰]) --> OSCheck{운영체제 감지} + OSCheck -- macOS --> BrewInstall["Homebrew Cask μ„€μΉ˜
(brew install --cask vscodium)
λ˜λŠ” GitHub Release 폴백"] + OSCheck -- Linux --> LinuxRepo["곡식 νŒ¨ν‚€μ§€ μ €μž₯μ†Œ 등둝 및 μ„€μΉ˜
APT (Debian/Ubuntu) / DNFΒ·Zypper (RHEL/SUSE) /
Pacman·AUR (Arch) / GitHub Release tarball 폴백"] + OSCheck -- Windows --> WinInstall["winget install --id VSCodium.VSCodium
λ˜λŠ” GitHub Releases UserSetup.exe
무인 μ„€μΉ˜(/VERYSILENT) 및 PATH μ—°κ²°"] + BrewInstall & LinuxRepo & WinInstall --> CLI["codium CLI λͺ…λ Ήμ–΄ 및 PATH 검증"] + CLI --> Done([μ„€μΉ˜ μ™„λ£Œ]) +``` + +## 2. μž‘μ—… 단계 및 체크리슀트 + +### 단계 1: μ‹€ν–‰ κ³„νš 수립 +- [x] μž‘μ—… κ³„νšμ„œ(`VIBE-WORK/261104/INSTALL-CODIUM-IMP-PLAN.md`) μž‘μ„± + +### 단계 2: Unix / macOS용 `install-codium.sh` κ΅¬ν˜„ +- [x] macOS: Homebrewλ₯Ό ν†΅ν•œ `brew install --cask vscodium` μ„€μΉ˜ 및 `/Applications/VSCodium.app/Contents/Resources/app/bin/codium`을 `~/.local/bin/codium`에 심볼릭 링크 μ—°κ²° +- [x] Linux (Debian/Ubuntu): https://vscodium.com 곡식 κ°€μ΄λ“œμ— 따라 GPG ν‚€(`/usr/share/keyrings/vscodium-archive-keyring.gpg`) 및 APT μ €μž₯μ†Œ(`https://download.vscodium.com/debs`) 등둝 ν›„ `sudo apt-get install -y codium` +- [x] Linux (Fedora/RHEL/Rocky/openSUSE): 곡식 RPM μ €μž₯μ†Œ(`https://download.vscodium.com/rpms/`) 및 GPG ν‚€ 등둝 ν›„ `dnf` / `zypper` μ„€μΉ˜ +- [x] Linux (Arch): `yay` / `paru` λ“± AUR 헬퍼 λ˜λŠ” Snap/Flatpak/GitHub Releases(`VSCodium-linux--.tar.gz`) 3단계 λ°©μ–΄ 폴백 지원 +- [x] μ‹€ν–‰ κΆŒν•œ λΆ€μ—¬ 및 `bash -n` 문법 검증 + +### 단계 3: Windows용 `install-codium.ps1` κ΅¬ν˜„ +- [x] 1μ°¨: 곡식 ꢌμž₯ 방식인 `winget install -e --id VSCodium.VSCodium` μ„€μΉ˜ μ‹œλ„ +- [x] 2μ°¨(폴백): `winget`이 μ—†κ±°λ‚˜ μ‹€νŒ¨ν•  경우 GitHub Releases API(`VSCodium/vscodium`)μ—μ„œ μ•„ν‚€ν…μ²˜(`x64`/`arm64`)에 λ§žλŠ” μ΅œμ‹  `VSCodiumUserSetup--.exe` 에셋을 λ‹€μš΄λ‘œλ“œν•˜μ—¬ 무인 μ„€μΉ˜(`/VERYSILENT /MERGETASKS=!runcode,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath`) μˆ˜ν–‰ (Fallback 버전 `1.96.2.24355` λ‚΄μž₯) +- [x] `codium.cmd` / `codium` 경둜 확인 및 ν˜„μž¬ μ„Έμ…˜/μ‚¬μš©μž `PATH` μžλ™ 등둝 + +### 단계 4: `README.md` 및 `NECESSARY.md` λ¬Έμ„œ μ—…λ°μ΄νŠΈ +- [x] `README.md`의 `3. 개발 μœ ν‹Έλ¦¬ν‹° & μ›Ή 터미널` μ„Ήμ…˜μ— `VSCodium (codium)` μΆ”κ°€ (VS Codeμ—μ„œ νŒŒμƒλ˜μ—ˆμœΌλ‚˜ λΆˆν•„μš”ν•œ νŠΈλž˜ν‚Ή/독점 μš”μ†Œλ₯Ό λœμ–΄λ‚΄κ³  μ΅œμ†Œν•œμ˜ 핡심 κΈ°λŠ₯만 담은 순수 μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œ μ—λ””ν„°μž„μ„ κ°•μ‘°) +- [x] `NECESSARY.md`의 `3. 개발 μœ ν‹Έλ¦¬ν‹°` μ„Ήμ…˜ 및 μ„€μΉ˜ κ°€μ΄λ“œ, 핡심 μ‚¬μš©λ²•μ— `VSCodium (codium)` μΆ”κ°€ + +### 단계 5: μ™„λ£Œ λ³΄κ³ μ„œ μž‘μ„± 및 Graphify κ°±μ‹  / Git ν‘Έμ‹œ +- [x] μ™„λ£Œ λ³΄κ³ μ„œ(`VIBE-WORK/261104/INSTALL-CODIUM-PHASE01.md`) μž‘μ„± +- [x] `uv tool run --from graphifyy graphify update .` μ‹€ν–‰ +- [x] Git commit 및 push diff --git a/VIBE-WORK/261104/INSTALL-CODIUM-PHASE01.md b/VIBE-WORK/261104/INSTALL-CODIUM-PHASE01.md new file mode 100644 index 0000000..a923d23 --- /dev/null +++ b/VIBE-WORK/261104/INSTALL-CODIUM-PHASE01.md @@ -0,0 +1,33 @@ +# VSCodium (codium) μ„€μΉ˜ 슀크립트 및 λ¬Έμ„œ μΆ”κ°€ μ™„λ£Œ λ³΄κ³ μ„œ (INSTALL-CODIUM-PHASE01) + +## 1. κ°œμš” +Microsoft의 Visual Studio Code(VS Code) μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œλ² μ΄μŠ€μ—μ„œ 원격 μΈ‘μ •(Telemetry), 좔적기, 독점 λΌμ΄μ„ μŠ€ μš”μ†Œλ₯Ό λͺ¨λ‘ μ œκ±°ν•˜κ³  **κ°œλ°œμ— κΌ­ ν•„μš”ν•œ μ΅œμ†Œν•œμ˜ 핡심 κΈ°λŠ₯만 남긴 순수 μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œ 에디터 `VSCodium (codium)`**의 크둜슀 ν”Œλž«νΌ μžλ™ μ„€μΉ˜ 슀크립트(`install-codium.sh`, `install-codium.ps1`)λ₯Ό κ΅¬ν˜„ν•˜κ³  `README.md` 및 `NECESSARY.md`에 λ°˜μ˜ν•˜μ˜€μŠ΅λ‹ˆλ‹€. + +```mermaid +flowchart LR + subgraph Script["VSCodium μžλ™ μ„€μΉ˜"] + SH["install-codium.sh
(macOS Homebrew / Linux 곡식 APTΒ·RPMΒ·AUR / GitHub Release 폴백)"] + PS1["install-codium.ps1
(Windows winget / GitHub Release UserSetup.exe 폴백)"] + end + subgraph Docs["λ¬Έμ„œ 반영"] + README["README.md
3. 개발 μœ ν‹Έλ¦¬ν‹° μ„Ήμ…˜"] + NEC["NECESSARY.md
3. 개발 μœ ν‹Έλ¦¬ν‹° & 핡심 μ‚¬μš©λ²•"] + end + Script --> Docs +``` + +## 2. μ„ΈλΆ€ κ΅¬ν˜„ λ‚΄μ—­ + +### 2.1. `install-codium.sh` (macOS / Linux) +- **macOS**: 곡식 κ°€μ΄λ“œλŒ€λ‘œ `brew install --cask vscodium` μ„€μΉ˜ 및 `/Applications/VSCodium.app/Contents/Resources/app/bin/codium`을 `~/.local/bin/codium`에 심볼릭 링크 μ—°κ²° (μ‹€νŒ¨ μ‹œ GitHub Releases `VSCodium-darwin--.zip` 직접 μ„€μΉ˜ 폴백) +- **Linux (Debian/Ubuntu/Mint)**: 곡식 GPG ν‚€(`/usr/share/keyrings/vscodium-archive-keyring.gpg`) 및 APT μ €μž₯μ†Œ(`https://download.vscodium.com/debs`) 등둝 ν›„ `codium` μ„€μΉ˜ +- **Linux (Fedora/RHEL/Rocky/openSUSE)**: 곡식 RPM μ €μž₯μ†Œ(`https://download.vscodium.com/rpms/`) 등둝 ν›„ `dnf` / `yum` / `zypper`λ₯Ό ν†΅ν•œ `codium` μ„€μΉ˜ +- **Linux (Arch & λ²”μš© 폴백)**: `yay`/`paru` 지원 및 λΉ„λ£¨νŠΈΒ·κΈ°νƒ€ 배포판 ν™˜κ²½μ„ μœ„ν•œ GitHub Releases(`VSCodium-linux--.tar.gz`) 3단계 폴백 λ‹€μš΄λ‘œλ“œ 지원 + +### 2.2. `install-codium.ps1` (Windows PowerShell) +- **1μ°¨ μ„€μΉ˜**: 곡식 ꢌμž₯ `winget install -e --id VSCodium.VSCodium` μ‹€ν–‰ +- **2μ°¨ 폴백**: `winget` 미지원 λ˜λŠ” 였λ₯˜ λ°œμƒ μ‹œ GitHub Releases APIμ—μ„œ `VSCodiumUserSetup--.exe`λ₯Ό λ‹€μš΄λ‘œλ“œν•˜μ—¬ 무인 μ„€μΉ˜(`/VERYSILENT`) 및 PATH μžλ™ 등둝 + +### 2.3. λ¬Έμ„œ μ—…λ°μ΄νŠΈ (`README.md`, `NECESSARY.md`) +- `3. 개발 μœ ν‹Έλ¦¬ν‹°` μΉ΄ν…Œκ³ λ¦¬μ— **VSCodium (codium)** μΆ”κ°€ +- VS Codeμ—μ„œ μΆœλ°œν–ˆμœΌλ‚˜ 원격 μΈ‘μ •(Telemetry)·좔적기·독점 μš”μ†Œλ₯Ό κ±·μ–΄λ‚΄κ³  μ΅œμ†Œν•œμ˜ ν•„μš”ν•œ 핡심 κΈ°λŠ₯만 남긴 순수 μ˜€ν”ˆμ†ŒμŠ€ μ½”λ“œ μ—λ””ν„°λΌλŠ” 점을 κ°•μ‘° diff --git a/install-codium.ps1 b/install-codium.ps1 new file mode 100644 index 0000000..2fb7791 --- /dev/null +++ b/install-codium.ps1 @@ -0,0 +1,243 @@ +#Requires -Version 5.1 +<# +.SYNOPSIS + Installs VSCodium (codium) β€” Free/Libre Open Source Software Binaries of VS Code. + +.DESCRIPTION + Installs VSCodium on Windows following https://vscodium.com/ recommendations: + 1) Primary: winget install -e --id VSCodium.VSCodium + 2) Fallback: Downloads the latest VSCodiumUserSetup--.exe + from GitHub Releases (VSCodium/vscodium) and runs silent user install. + + Supported architectures: + - Windows x64 (AMD64 / Intel 64bit) + - Windows ARM64 + +.PARAMETER AddToPath + Whether to permanently add VSCodium's bin directory to User PATH. Default: $true + +.EXAMPLE + .\install-codium.ps1 + + # One-liner install from remote (works on Windows 10+): + powershell -ExecutionPolicy Bypass -c "[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $t=\"$env:TEMP\install-codium.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-codium.ps1' -OutFile $t; & $t" + +.NOTES + If execution policy error occurs: + Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser +#> + +[CmdletBinding()] +param( + [bool] $AddToPath = $true +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +# Force TLS 1.2+ for HTTPS downloads (required on Windows 10 / PowerShell 5.1) +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +# ──────────────────────────────────────────── +# Constants +# ──────────────────────────────────────────── +$REPO = "VSCodium/vscodium" +$API_URL = "https://api.github.com/repos/$REPO/releases" +$FALLBACK_TAG = "1.96.2.24355" +$LOCAL_BIN = Join-Path $env:USERPROFILE ".local\bin" + +# ──────────────────────────────────────────── +# Utility functions +# ──────────────────────────────────────────── +function Info { Write-Host "[INFO] $args" -ForegroundColor Cyan } +function Warn { Write-Host "[WARN] $args" -ForegroundColor Yellow } +function Success { Write-Host "[OK] $args" -ForegroundColor Green } +function ErrExit { Write-Host "[ERROR] $args" -ForegroundColor Red; exit 1 } + +# ──────────────────────────────────────────── +# Architecture detection +# ──────────────────────────────────────────── +function Get-CodiumArch { + $envArch = $env:PROCESSOR_ARCHITEW6432 + if (-not $envArch) { $envArch = $env:PROCESSOR_ARCHITECTURE } + + switch -Regex ($envArch) { + '^AMD64$' { return "x64" } + '^ARM64$' { return "arm64" } + '^x86$' { return "ia32" } + default { return "x64" } + } +} + +# ──────────────────────────────────────────── +# Get latest release tag with assets from GitHub API +# ──────────────────────────────────────────── +function Get-LatestTag { + Info "Fetching latest VSCodium release from GitHub API..." + + try { + $releases = Invoke-RestMethod -Uri $API_URL -UseBasicParsing ` + -Headers @{ 'User-Agent' = 'install-codium-ps1' } -TimeoutSec 15 + + $latest = $releases | Where-Object { + $_.prerelease -eq $false -and $_.assets -and $_.assets.Count -gt 0 + } | Select-Object -First 1 + + if ($latest -and $latest.tag_name) { + return $latest.tag_name + } + } catch { + Warn "GitHub API lookup failed: $_" + } + + Warn "Using fallback release tag: $FALLBACK_TAG" + return $FALLBACK_TAG +} + +# ──────────────────────────────────────────── +# Install via GitHub Releases UserSetup.exe (Fallback) +# ──────────────────────────────────────────── +function Install-FromGitHub { + $arch = Get-CodiumArch + $tag = Get-LatestTag + Info "Target VSCodium release: $tag ($arch)" + + $exeName = "VSCodiumUserSetup-${arch}-${tag}.exe" + $downloadUrl = "https://github.com/$REPO/releases/download/$tag/$exeName" + $fallbackExe = "VSCodiumUserSetup-${arch}-${FALLBACK_TAG}.exe" + $fallbackUrl = "https://github.com/$REPO/releases/download/$FALLBACK_TAG/$fallbackExe" + + $tmpDir = Join-Path $env:TEMP "codium_install_$(Get-Random)" + New-Item -ItemType Directory -Path $tmpDir -Force | Out-Null + + try { + $setupPath = Join-Path $tmpDir $exeName + Info "Downloading installer: $downloadUrl" + + try { + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri $downloadUrl -OutFile $setupPath -UseBasicParsing + $ProgressPreference = 'Continue' + } catch { + if ($downloadUrl -ne $fallbackUrl) { + Warn "Primary download failed. Retrying with fallback version ($FALLBACK_TAG): $fallbackUrl" + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri $fallbackUrl -OutFile $setupPath -UseBasicParsing + $ProgressPreference = 'Continue' + } else { + ErrExit "Failed to download VSCodium installer: $_" + } + } + + Info "Running VSCodium silent installer..." + $installArgs = "/VERYSILENT /NORESTART /MERGETASKS=!runcode,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath" + $proc = Start-Process -FilePath $setupPath -ArgumentList $installArgs -Wait -PassThru + if ($proc.ExitCode -ne 0) { + Warn "Installer exited with code $($proc.ExitCode)" + } else { + Success "VSCodium installed via official UserSetup installer." + } + } finally { + if (Test-Path $tmpDir) { + Remove-Item -Path $tmpDir -Recurse -Force -ErrorAction SilentlyContinue + } + } +} + +# ──────────────────────────────────────────── +# Add directory to User PATH +# ──────────────────────────────────────────── +function Add-ToUserPath { + param([string]$Dir) + + $normalizedDir = $Dir.TrimEnd('\') + + if ($env:Path -notlike "*$normalizedDir*") { + $env:Path = "$normalizedDir;$env:Path" + Info "Added $normalizedDir to current session PATH." + } + + $currentPath = [Environment]::GetEnvironmentVariable('Path', 'User') + if (-not $currentPath) { $currentPath = '' } + $dirs = @($currentPath -split ';' | Where-Object { $_ -ne '' }) + + $alreadyInPath = $false + foreach ($d in $dirs) { + if ($d.Trim().TrimEnd('\') -eq $normalizedDir) { + $alreadyInPath = $true + break + } + } + + if (-not $alreadyInPath) { + $newPath = if ($currentPath) { "$normalizedDir;$currentPath" } else { $normalizedDir } + [Environment]::SetEnvironmentVariable('Path', $newPath, 'User') + Success "Added '$normalizedDir' to User PATH permanently." + } else { + Info "'$normalizedDir' is already in User PATH." + } +} + +# ──────────────────────────────────────────── +# Main +# ──────────────────────────────────────────── +function Main { + Info "===== VSCodium (codium) install script (Windows PowerShell) =====" + + $installed = $false + + # 1) Try official winget installation first (https://vscodium.com/#install-with-winget-windows) + if (Get-Command winget -ErrorAction SilentlyContinue) { + Info "Installing VSCodium via winget (VSCodium.VSCodium)..." + try { + & winget install -e --id VSCodium.VSCodium --accept-package-agreements --accept-source-agreements + if ($LASTEXITCODE -eq 0 -or $LASTEXITCODE -eq -1978335189) { + # -1978335189 = APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE (already installed) + $installed = $true + Success "VSCodium installed/verified via winget." + } + } catch { + Warn "winget installation encountered an issue: $_" + } + } + + # 2) Fallback to GitHub Releases direct UserSetup installer + if (-not $installed) { + Info "Falling back to direct download from VSCodium GitHub Releases..." + Install-FromGitHub + } + + # 3) Locate codium bin directory and ensure PATH registration + $candidateDirs = @( + (Join-Path $env:LOCALAPPDATA "Programs\VSCodium\bin"), + (Join-Path $env:ProgramFiles "VSCodium\bin"), + (Join-Path ${env:ProgramFiles(x86)} "VSCodium\bin") + ) + + $codiumBinDir = $null + foreach ($dir in $candidateDirs) { + if ($dir -and (Test-Path (Join-Path $dir "codium.cmd"))) { + $codiumBinDir = $dir + break + } + } + + if ($codiumBinDir -and $AddToPath) { + Add-ToUserPath -Dir $codiumBinDir + } + + Info "" + Info "==================================================" + Success "VSCodium (codium) installation complete!" + Info "==================================================" + Info "" + Info "Getting started:" + Info " codium . - Open current folder in VSCodium" + Info " codium - Open file in VSCodium" + Info " codium --install-extension - Install Open VSX extension" + Info " codium --version - Show version info" + Info "" + Info "NOTE: Open a new terminal window if 'codium' command is not immediately recognized." +} + +Main diff --git a/install-codium.sh b/install-codium.sh new file mode 100755 index 0000000..429416d --- /dev/null +++ b/install-codium.sh @@ -0,0 +1,313 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2086 + +# VSCodium (codium) 곡식 κ°€μ΄λ“œ 기반 μžλ™ μ„€μΉ˜ 슀크립트 +# 곡식 μ‚¬μ΄νŠΈ: https://vscodium.com/ +# 곡식 GitHub: https://github.com/VSCodium/vscodium +# +# VS Code μ˜€ν”ˆμ†ŒμŠ€μ—μ„œ λΆˆν•„μš”ν•œ 원격 μΈ‘μ •(Telemetry)/좔적기 및 독점 μš”μ†Œλ₯Ό μ œκ±°ν•˜κ³  +# κ°œλ°œμ— ν•„μš”ν•œ 핡심 κΈ°λŠ₯만 κΉ”λ”ν•˜κ²Œ 남긴 순수 μ˜€ν”ˆμ†ŒμŠ€ λ°”μ΄λ„ˆλ¦¬ μ—λ””ν„°μž…λ‹ˆλ‹€. +# +# 지원 ν”Œλž«νΌ: +# macOS : Homebrew Cask (brew install --cask vscodium) + GitHub Release 폴백 +# Linux : +# - Debian / Ubuntu / Mint : 곡식 APT μ €μž₯μ†Œ 등둝 및 μ„€μΉ˜ +# - Fedora / RHEL / Rocky / Alma / openSUSE : 곡식 RPM μ €μž₯μ†Œ 등둝 및 μ„€μΉ˜ +# - Arch Linux : AUR 헬퍼(yay/paru) λ˜λŠ” Snap / GitHub Release tarball 폴백 +# - λ²”μš© 폴백 : GitHub Releases 정식 λ°”μ΄λ„ˆλ¦¬ (VSCodium-linux--.tar.gz) + +set -euo pipefail + +# ──────────────────────────────────────────── +# μƒμˆ˜ μ •μ˜ +# ──────────────────────────────────────────── +REPO="VSCodium/vscodium" +API_URL="https://api.github.com/repos/${REPO}/releases" +FALLBACK_TAG="1.96.2.24355" +INSTALL_DIR="${HOME}/.local/bin" +OPT_DIR="${HOME}/.local/share/vscodium" +GPG_KEY_URL="https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg" + +# ──────────────────────────────────────────── +# μœ ν‹Έλ¦¬ν‹° ν•¨μˆ˜ (λͺ¨λ‘ stderr 좜λ ₯) +# ──────────────────────────────────────────── +info() { echo "[INFO] $*" >&2; } +warn() { echo "[WARN] $*" >&2; } +error() { echo "[ERROR] $*" >&2; exit 1; } +success() { echo "[OK] $*" >&2; } + +# ──────────────────────────────────────────── +# ν•„μˆ˜ λͺ…λ Ήμ–΄ 확인 +# ──────────────────────────────────────────── +for cmd in curl uname; do + command -v "$cmd" &>/dev/null || error "'$cmd' λͺ…λ Ήμ–΄κ°€ ν•„μš”ν•©λ‹ˆλ‹€." +done + +# ──────────────────────────────────────────── +# macOS용 Homebrew 확인 및 μ„€μΉ˜ +# ──────────────────────────────────────────── +ensure_brew() { + if command -v brew &>/dev/null; then + return 0 + fi + info "Homebrewκ°€ μ„€μΉ˜λ˜μ–΄ μžˆμ§€ μ•ŠμŠ΅λ‹ˆλ‹€. Homebrew μ„€μΉ˜λ₯Ό μ§„ν–‰ν•©λ‹ˆλ‹€..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + if [ -d /opt/homebrew/bin ]; then + export PATH="/opt/homebrew/bin:$PATH" + fi + if [ -d /usr/local/bin ]; then + export PATH="/usr/local/bin:$PATH" + fi + command -v brew &>/dev/null || return 1 + success "Homebrew μ„€μΉ˜ μ™„λ£Œ" +} + +# ──────────────────────────────────────────── +# GitHub APIμ—μ„œ 에셋이 μ‘΄μž¬ν•˜λŠ” μ΅œμ‹  릴리슀 νƒœκ·Έ 쑰회 +# ──────────────────────────────────────────── +if command -v jq &>/dev/null; then + _json_latest_tag() { + jq -r '[.[] | select(.prerelease==false and ((.assets | length) > 0))] | .[0].tag_name' + } +elif command -v python3 &>/dev/null; then + _json_latest_tag() { + python3 -c " +import sys, json +data = json.load(sys.stdin) +for r in data: + if not r.get('prerelease') and r.get('assets'): + print(r.get('tag_name', '')) + break +" + } +else + _json_latest_tag() { + grep -oE '"tag_name":[[:space:]]*"[^"]+"' | head -1 | sed -E 's/.*"([^"]+)"$/\1/' + } +fi + +get_latest_tag() { + info "GitHub APIμ—μ„œ VSCodium μ΅œμ‹  릴리슀 버전을 μ‘°νšŒν•˜λŠ” 쀑..." + local releases="" tag="" + releases="$(curl -fsSL -H "User-Agent: install-codium-sh" --connect-timeout 10 "${API_URL}" 2>/dev/null)" || true + + if [[ -n "$releases" ]]; then + tag="$(echo "$releases" | _json_latest_tag 2>/dev/null || true)" + fi + + if [[ -z "$tag" || "$tag" == "null" ]]; then + warn "GitHub API 쑰회 μ‹€νŒ¨. κ²€μ¦λœ 폴백 버전(${FALLBACK_TAG})을 μ‚¬μš©ν•©λ‹ˆλ‹€." + tag="${FALLBACK_TAG}" + fi + echo "$tag" +} + +# ──────────────────────────────────────────── +# Linux 곡식 APT μ €μž₯μ†Œ μ„€μΉ˜ (Debian / Ubuntu / Mint) +# https://vscodium.com/#install-on-debian-ubuntu-deb-package +# ──────────────────────────────────────────── +install_linux_apt() { + info "Debian/Ubuntu 계열 감지: 곡식 VSCodium APT μ €μž₯μ†Œλ₯Ό κ΅¬μ„±ν•©λ‹ˆλ‹€..." + + sudo apt-get update -y 2>/dev/null || true + sudo apt-get install -y wget gpg apt-transport-https 2>/dev/null || true + + # 1. GPG ν‚€ 등둝 + curl -fsSL "${GPG_KEY_URL}" | gpg --dearmor | sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg 2>/dev/null + + # 2. APT μ €μž₯μ†Œ 등둝 + echo 'deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg] https://download.vscodium.com/debs vscodium main' | + sudo tee /etc/apt/sources.list.d/vscodium.list >/dev/null + + # 3. νŒ¨ν‚€μ§€ μ—…λ°μ΄νŠΈ 및 codium μ„€μΉ˜ + sudo apt-get update -y + sudo apt-get install -y codium + success "APT 곡식 μ €μž₯μ†Œλ₯Ό 톡해 VSCodium (codium) μ„€μΉ˜ μ™„λ£Œ!" +} + +# ──────────────────────────────────────────── +# Linux 곡식 RPM μ €μž₯μ†Œ μ„€μΉ˜ (Fedora / RHEL / Rocky / openSUSE) +# https://vscodium.com/#install-on-fedora-rhel-opensuse-rpm-package +# ──────────────────────────────────────────── +install_linux_rpm() { + info "RHEL/Fedora/openSUSE 계열 감지: 곡식 VSCodium RPM μ €μž₯μ†Œλ₯Ό κ΅¬μ„±ν•©λ‹ˆλ‹€..." + + sudo rpmkeys --import "${GPG_KEY_URL}" + + if command -v dnf &>/dev/null || command -v yum &>/dev/null; then + printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=${GPG_KEY_URL}\nmetadata_expire=1h\n" | + sudo tee /etc/yum.repos.d/vscodium.repo >/dev/null + if command -v dnf &>/dev/null; then + sudo dnf install -y codium + else + sudo yum install -y codium + fi + success "DNF/YUM 곡식 μ €μž₯μ†Œλ₯Ό 톡해 VSCodium (codium) μ„€μΉ˜ μ™„λ£Œ!" + elif command -v zypper &>/dev/null; then + printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=gitlab.com_paulcarroty_vscodium_repo\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=${GPG_KEY_URL}\nmetadata_expire=1h\n" | + sudo tee /etc/zypp/repos.d/vscodium.repo >/dev/null + sudo zypper -n --gpg-auto-import-keys refresh + sudo zypper -n install codium + success "Zypper 곡식 μ €μž₯μ†Œλ₯Ό 톡해 VSCodium (codium) μ„€μΉ˜ μ™„λ£Œ!" + else + return 1 + fi +} + +# ──────────────────────────────────────────── +# GitHub Releases 직접 λ‹€μš΄λ‘œλ“œ 폴백 (Linux / macOS) +# ──────────────────────────────────────────── +install_from_github_tarball() { + local os="$1" + local arch="$2" + local codium_arch="" + + case "$arch" in + x86_64 | amd64) codium_arch="x64" ;; + aarch64 | arm64) codium_arch="arm64" ;; + armv7l | armhf) codium_arch="armhf" ;; + *) error "μ§€μ›ν•˜μ§€ μ•ŠλŠ” μ•„ν‚€ν…μ²˜μž…λ‹ˆλ‹€: $arch" ;; + esac + + local tag + tag="$(get_latest_tag)" + info "GitHub Releasesμ—μ„œ VSCodium (${tag}) λ°”μ΄λ„ˆλ¦¬λ₯Ό λ‹€μš΄λ‘œλ“œν•©λ‹ˆλ‹€..." + + local tmpdir + tmpdir="$(mktemp -d)" + trap '[[ -d "${tmpdir:-}" ]] && rm -rf "$tmpdir"' EXIT + + if [[ "$os" == "Darwin" ]]; then + local filename="VSCodium-darwin-${codium_arch}-${tag}.zip" + local url="https://github.com/${REPO}/releases/download/${tag}/${filename}" + local fallback_url="https://github.com/${REPO}/releases/download/${FALLBACK_TAG}/VSCodium-darwin-${codium_arch}-${FALLBACK_TAG}.zip" + + info "λ‹€μš΄λ‘œλ“œ 쀑: $url" + if ! curl -fsSL --progress-bar -o "${tmpdir}/${filename}" "$url"; then + warn "μ΅œμ‹  버전 λ‹€μš΄λ‘œλ“œ μ‹€νŒ¨. 폴백 버전(${FALLBACK_TAG})으둜 μž¬μ‹œλ„ν•©λ‹ˆλ‹€: $fallback_url" + curl -fsSL --progress-bar -o "${tmpdir}/${filename}" "$fallback_url" || + error "λ‹€μš΄λ‘œλ“œ μ‹€νŒ¨: $fallback_url" + fi + + info "/Applications κ²½λ‘œμ— μ••μΆ• ν•΄μ œ 쀑..." + unzip -q -o "${tmpdir}/${filename}" -d "/Applications" + mkdir -p "$INSTALL_DIR" + ln -sf "/Applications/VSCodium.app/Contents/Resources/app/bin/codium" "${INSTALL_DIR}/codium" + success "VSCodium.app μ„€μΉ˜ 및 ${INSTALL_DIR}/codium 심볼릭 링크 생성 μ™„λ£Œ!" + else + local filename="VSCodium-linux-${codium_arch}-${tag}.tar.gz" + local url="https://github.com/${REPO}/releases/download/${tag}/${filename}" + local fallback_url="https://github.com/${REPO}/releases/download/${FALLBACK_TAG}/VSCodium-linux-${codium_arch}-${FALLBACK_TAG}.tar.gz" + + info "λ‹€μš΄λ‘œλ“œ 쀑: $url" + if ! curl -fsSL --progress-bar -o "${tmpdir}/${filename}" "$url"; then + warn "μ΅œμ‹  버전 λ‹€μš΄λ‘œλ“œ μ‹€νŒ¨. 폴백 버전(${FALLBACK_TAG})으둜 μž¬μ‹œλ„ν•©λ‹ˆλ‹€: $fallback_url" + curl -fsSL --progress-bar -o "${tmpdir}/${filename}" "$fallback_url" || + error "λ‹€μš΄λ‘œλ“œ μ‹€νŒ¨: $fallback_url" + fi + + info "${OPT_DIR} κ²½λ‘œμ— μ••μΆ• ν•΄μ œ 쀑..." + rm -rf "$OPT_DIR" + mkdir -p "$OPT_DIR" + tar -xzf "${tmpdir}/${filename}" -C "$OPT_DIR" + + mkdir -p "$INSTALL_DIR" + ln -sf "${OPT_DIR}/bin/codium" "${INSTALL_DIR}/codium" + success "VSCodium λ¦¬λˆ…μŠ€ λ°”μ΄λ„ˆλ¦¬ 배포 및 ${INSTALL_DIR}/codium μ—°κ²° μ™„λ£Œ!" + fi +} + +# ──────────────────────────────────────────── +# 메인 μ„€μΉ˜ 둜직 +# ──────────────────────────────────────────── +main() { + local os arch + os="$(uname -s)" + arch="$(uname -m)" + + info "===== VSCodium (codium) μ„€μΉ˜ 슀크립트 =====" + info "κ°μ§€λœ ν™˜κ²½: OS=${os}, ARCH=${arch}" + + if command -v codium &>/dev/null; then + info "이미 codium이 μ„€μΉ˜λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€: $(command -v codium)" + codium --version 2>/dev/null | head -n 1 || true + fi + + case "$os" in + Darwin) + info "macOS ν™˜κ²½μ—μ„œ 곡식 ꢌμž₯ 방식(Homebrew Cask)으둜 μ„€μΉ˜λ₯Ό μ‹œλ„ν•©λ‹ˆλ‹€..." + if ensure_brew && brew install --cask vscodium; then + success "Homebrewλ₯Ό 톡해 VSCodium이 μ„€μΉ˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€!" + if [ -x "/Applications/VSCodium.app/Contents/Resources/app/bin/codium" ]; then + mkdir -p "$INSTALL_DIR" + ln -sf "/Applications/VSCodium.app/Contents/Resources/app/bin/codium" "${INSTALL_DIR}/codium" 2>/dev/null || true + fi + else + warn "Homebrew Cask μ„€μΉ˜ μ‹€νŒ¨. GitHub Releases 직접 λ‹€μš΄λ‘œλ“œ λ°©μ‹μœΌλ‘œ μ „ν™˜ν•©λ‹ˆλ‹€..." + install_from_github_tarball "$os" "$arch" + fi + ;; + + Linux) + local installed="false" + + # 1. Debian / Ubuntu 계열 (apt-get) + if command -v apt-get &>/dev/null && command -v sudo &>/dev/null; then + if install_linux_apt; then + installed="true" + fi + # 2. Fedora / RHEL / openSUSE 계열 (dnf / yum / zypper) + elif (command -v dnf &>/dev/null || command -v yum &>/dev/null || command -v zypper &>/dev/null) && command -v sudo &>/dev/null; then + if install_linux_rpm; then + installed="true" + fi + # 3. Arch Linux 계열 (yay / paru) + elif command -v pacman &>/dev/null; then + if command -v yay &>/dev/null; then + info "Arch Linux 감지: yayλ₯Ό 톡해 vscodium-bin을 μ„€μΉ˜ν•©λ‹ˆλ‹€..." + if yay -S --noconfirm vscodium-bin; then + installed="true" + fi + elif command -v paru &>/dev/null; then + info "Arch Linux 감지: paruλ₯Ό 톡해 vscodium-bin을 μ„€μΉ˜ν•©λ‹ˆλ‹€..." + if paru -S --noconfirm vscodium-bin; then + installed="true" + fi + fi + fi + + # 4. νŒ¨ν‚€μ§€ λ§€λ‹ˆμ € μ„€μΉ˜ μ‹€νŒ¨ λ˜λŠ” λΉ„λ£¨νŠΈ ν™˜κ²½μΌ 경우 GitHub 곡식 tarball 폴백 + if [[ "$installed" != "true" ]]; then + warn "배포판 νŒ¨ν‚€μ§€ λ§€λ‹ˆμ € μ„€μΉ˜λ₯Ό μ‚¬μš©ν•  수 μ—†κ±°λ‚˜ μ‹€νŒ¨ν•˜μ—¬ GitHub 곡식 릴리슀 λ°”μ΄λ„ˆλ¦¬λ‘œ μ„€μΉ˜ν•©λ‹ˆλ‹€..." + install_from_github_tarball "$os" "$arch" + fi + ;; + + MINGW* | MSYS* | CYGWIN*) + error "Windows ν™˜κ²½μž…λ‹ˆλ‹€. PowerShellμ—μ„œ install-codium.ps1을 μ‹€ν–‰ν•΄ μ£Όμ„Έμš”." + ;; + + *) + error "μ§€μ›ν•˜μ§€ μ•ŠλŠ” μš΄μ˜μ²΄μ œμž…λ‹ˆλ‹€: $os" + ;; + esac + + # PATH μ•ˆλ‚΄ + if ! echo ":${PATH}:" | grep -q ":${INSTALL_DIR}:"; then + export PATH="${INSTALL_DIR}:${PATH}" + warn "'${INSTALL_DIR}' κ²½λ‘œκ°€ PATH에 없을 경우 μ‰˜ μ„€μ •(~/.bashrc λ˜λŠ” ~/.zshrc)에 μΆ”κ°€ν•˜μ„Έμš”:" + warn " export PATH=\"\$HOME/.local/bin:\$PATH\"" + fi + + echo "" >&2 + info "==================================================" + success "VSCodium (codium) μ„€μΉ˜κ°€ μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€!" + info "==================================================" + info "μ£Όμš” μ‚¬μš©λ²•:" + info " codium . # ν˜„μž¬ 디렉토리λ₯Ό VSCodium으둜 μ—΄κΈ°" + info " codium # νŠΉμ • 파일 νŽΈμ§‘" + info " codium --install-extension # Open VSX ν™•μž₯ ν”ŒλŸ¬κ·ΈμΈ μ„€μΉ˜" + info " codium --version # μ„€μΉ˜λœ 버전 확인" +} + +main "$@" diff --git a/yes.sh b/yes.sh index 69fb129..0429546 100755 --- a/yes.sh +++ b/yes.sh @@ -1,7 +1,15 @@ -# 2μ΄ˆλ§ˆλ‹€ 0번 팬(install-sh:0.0) 화면을 ν™•μΈν•˜μ—¬ 선택 ν”„λ‘¬ν”„νŠΈκ°€ 뜨면 Enter(κΈ°λ³Έκ°’ 1번 선택) 전솑 +#!/usr/bin/env bash +# ν˜„μž¬ tmux μ„Έμ…˜ 이름 μžλ™ μΆ”μΆœ +SESSION=$(tmux display-message -p '#S') +# 첫 번째 인자둜 팬 번호λ₯Ό λ°›λ˜, μ—†μœΌλ©΄ κΈ°λ³Έκ°’ 0번 팬 μ‚¬μš© +PANE=${1:-0} +TARGET="${SESSION}:0.${PANE}" + +echo "Watching tmux pane: ${TARGET} ..." + while true; do - if tmux capture-pane -t install-sh:0.0 -p | grep -q "> 1\. Yes"; then - tmux send-keys -t install-sh:0.0 Enter + if tmux capture-pane -t "${TARGET}" -p | grep -q "> 1\. Yes"; then + tmux send-keys -t "${TARGET}" Enter fi sleep 2 done