VSCodium(codium) 설치 스크립트 추가 및 README/NECESSARY 문서 반영
This commit is contained in:
1 parent
b41d2f68f3
commit
687ebb0e0a
7 files changed
+709
-8
No files matched your search
+29
-5
@@ -17,6 +17,7 @@
|
|||||||
### 🛠️ 3. 개발 유틸리티
|
### 🛠️ 3. 개발 유틸리티
|
||||||
* **[lazygit](https://github.com/jesseduffield/lazygit)** - Git 버전 관리를 키보드로 능숙하게 제어하는 시각적 TUI
|
* **[lazygit](https://github.com/jesseduffield/lazygit)** - Git 버전 관리를 키보드로 능숙하게 제어하는 시각적 TUI
|
||||||
* **[uv](https://docs.astral.sh/uv/)** - 초고속 Rust 기반 Python 패키지 & 프로젝트 통합 관리자
|
* **[uv](https://docs.astral.sh/uv/)** - 초고속 Rust 기반 Python 패키지 & 프로젝트 통합 관리자
|
||||||
|
* **[VSCodium (codium)](https://vscodium.com/)** - VS Code에서 파생되었으나 원격 측정(Telemetry)·추적기·독점 요소를 제거하고 최소한의 필요한 핵심 기능만 남긴 순수 오픈소스 코드 에디터
|
||||||
|
|
||||||
### 🤖 4. AI 개발 에이전트 & 도우미
|
### 🤖 4. AI 개발 에이전트 & 도우미
|
||||||
* **[Antigravity CLI (agy)](https://antigravity.google)** - Antigravity 2.0 플랫폼의 경량화 터미널 코딩 에이전트 CLI
|
* **[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
|
# uv
|
||||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
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 개발 에이전트 & 도우미
|
# 4. AI 개발 에이전트 & 도우미
|
||||||
# Antigravity CLI (agy)
|
# Antigravity CLI (agy)
|
||||||
curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-agy.sh?ref_type=heads" | bash
|
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
|
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 개발 에이전트 & 도우미
|
#### 4. AI 개발 에이전트 & 도우미
|
||||||
* **Antigravity CLI (agy):**
|
* **Antigravity CLI (agy):**
|
||||||
* **CMD:**
|
* **CMD:**
|
||||||
@@ -252,23 +266,33 @@ uv tool install <cli-tool> # 독립된 CLI 도구 글로벌 설치
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 6. AI 개발 에이전트 (Antigravity, Claude, Codex)
|
### 6. VSCodium (codium)
|
||||||
|
VS Code에서 출발했으나 원격 측정(Telemetry)·추적기·독점 요소를 모두 걷어내고 **개발에 꼭 필요한 최소한의 핵심 기능만 남긴 순수 오픈소스 코드 에디터**입니다.
|
||||||
|
```bash
|
||||||
|
codium . # 현재 디렉토리를 VSCodium으로 열기
|
||||||
|
codium <file> # 특정 파일 바로 열기
|
||||||
|
codium --install-extension <ext-id> # Open VSX 확장 플러그인 설치
|
||||||
|
```
|
||||||
|
|
||||||
#### 6.1. Antigravity CLI (agy)
|
---
|
||||||
|
|
||||||
|
### 7. AI 개발 에이전트 (Antigravity, Claude, Codex)
|
||||||
|
|
||||||
|
#### 7.1. Antigravity CLI (agy)
|
||||||
Google DeepMind의 Antigravity 플랫폼 터미널 코딩 에이전트입니다.
|
Google DeepMind의 Antigravity 플랫폼 터미널 코딩 에이전트입니다.
|
||||||
```bash
|
```bash
|
||||||
agy # 대화형 코딩 세션 시작
|
agy # 대화형 코딩 세션 시작
|
||||||
agy -p "작업 내용" # 단발성 프롬프트 실행
|
agy -p "작업 내용" # 단발성 프롬프트 실행
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 6.2. Claude Code
|
#### 7.2. Claude Code
|
||||||
Anthropic의 공식 터미널 기반 대화형 코딩 어시스턴트입니다.
|
Anthropic의 공식 터미널 기반 대화형 코딩 어시스턴트입니다.
|
||||||
```bash
|
```bash
|
||||||
claude # 대화형 코딩 세션 시작
|
claude # 대화형 코딩 세션 시작
|
||||||
claude -p "작업 내용" # 단발성 프롬프트 실행
|
claude -p "작업 내용" # 단발성 프롬프트 실행
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 6.3. Codex CLI
|
#### 7.3. Codex CLI
|
||||||
OpenAI의 공식 터미널 기반 로컬 대화형 코딩 에이전트입니다.
|
OpenAI의 공식 터미널 기반 로컬 대화형 코딩 에이전트입니다.
|
||||||
```bash
|
```bash
|
||||||
codex auth # 인증 로그인
|
codex auth # 인증 로그인
|
||||||
@@ -278,7 +302,7 @@ codex -p "작업 내용" # 단발성 빌드/수정 지시
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 7. graphify
|
### 8. graphify
|
||||||
코드베이스와 문서를 지식 그래프(Knowledge Graph)로 인덱싱하여 복잡한 프로젝트 구조를 빠르게 분석하고 질문에 정밀하게 답하도록 돕는 도구입니다.
|
코드베이스와 문서를 지식 그래프(Knowledge Graph)로 인덱싱하여 복잡한 프로젝트 구조를 빠르게 분석하고 질문에 정밀하게 답하도록 돕는 도구입니다.
|
||||||
```bash
|
```bash
|
||||||
graphify . # 현재 프로젝트 그래프 빌드/갱신
|
graphify . # 현재 프로젝트 그래프 빌드/갱신
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
### 🛠️ 3. 개발 유틸리티 & 웹 터미널
|
### 🛠️ 3. 개발 유틸리티 & 웹 터미널
|
||||||
* **[lazygit](https://github.com/jesseduffield/lazygit)** - Git 버전 관리를 키보드로 능숙하게 제어하는 시각적 TUI
|
* **[lazygit](https://github.com/jesseduffield/lazygit)** - Git 버전 관리를 키보드로 능숙하게 제어하는 시각적 TUI
|
||||||
* **[uv](https://docs.astral.sh/uv/)** - 초고속 Rust 기반 Python 패키지 & 프로젝트 통합 관리자
|
* **[uv](https://docs.astral.sh/uv/)** - 초고속 Rust 기반 Python 패키지 & 프로젝트 통합 관리자
|
||||||
|
* **[VSCodium (codium)](https://vscodium.com/)** - VS Code 오픈소스에서 원격 측정(Telemetry)·추적기·독점 요소를 모두 덜어내고 개발에 꼭 필요한 최소한의 핵심 기능만 남긴 순수 오픈소스 코드 에디터
|
||||||
|
|
||||||
### 🤖 4. AI 개발 에이전트 (AI Agents)
|
### 🤖 4. AI 개발 에이전트 (AI Agents)
|
||||||
* **[Antigravity CLI (agy)](https://antigravity.google)** - Antigravity 2.0 플랫폼의 경량화 터미널 코딩 에이전트 CLI
|
* **[Antigravity CLI (agy)](https://antigravity.google)** - Antigravity 2.0 플랫폼의 경량화 터미널 코딩 에이전트 CLI
|
||||||
@@ -112,6 +113,11 @@
|
|||||||
> source ~/.bashrc
|
> 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)
|
#### 🤖 4. AI 개발 에이전트 (AI Agents)
|
||||||
|
|
||||||
* **Antigravity CLI (agy):**
|
* **Antigravity CLI (agy):**
|
||||||
@@ -284,6 +290,16 @@
|
|||||||
> [System.Environment]::SetEnvironmentVariable('Path', $env:USERPROFILE + '\.local\bin;' + [System.Environment]::GetEnvironmentVariable('Path', 'User'), 'User')
|
> [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)
|
#### 🤖 4. AI 개발 에이전트 (AI Agents)
|
||||||
|
|
||||||
* **Antigravity CLI (agy):**
|
* **Antigravity CLI (agy):**
|
||||||
@@ -605,6 +621,30 @@ lazygit # 가동 명령어
|
|||||||
| `P` / `p` | 원격 저장소에 Push / Pull 요청 실행 |
|
| `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 <package> # 가상환경에 패키지 설치
|
||||||
|
uv run <script.py> # 가상환경을 자동 구성하여 스크립트 실행
|
||||||
|
uv tool install <cli-tool> # 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 <file> # 특정 파일 바로 열기
|
||||||
|
codium --install-extension <ext-id> # 확장 플러그인 설치
|
||||||
|
codium --list-extensions # 설치된 확장 플러그인 목록 확인
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 🤖 4. AI 개발 에이전트 (AI Agents)
|
### 🤖 4. AI 개발 에이전트 (AI Agents)
|
||||||
|
|||||||
@@ -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 설치<br/>(brew install --cask vscodium)<br/>또는 GitHub Release 폴백"]
|
||||||
|
OSCheck -- Linux --> LinuxRepo["공식 패키지 저장소 등록 및 설치<br/>APT (Debian/Ubuntu) / DNF·Zypper (RHEL/SUSE) /<br/>Pacman·AUR (Arch) / GitHub Release tarball 폴백"]
|
||||||
|
OSCheck -- Windows --> WinInstall["winget install --id VSCodium.VSCodium<br/>또는 GitHub Releases UserSetup.exe<br/>무인 설치(/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-<arch>-<ver>.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-<arch>-<version>.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
|
||||||
@@ -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<br/>(macOS Homebrew / Linux 공식 APT·RPM·AUR / GitHub Release 폴백)"]
|
||||||
|
PS1["install-codium.ps1<br/>(Windows winget / GitHub Release UserSetup.exe 폴백)"]
|
||||||
|
end
|
||||||
|
subgraph Docs["문서 반영"]
|
||||||
|
README["README.md<br/>3. 개발 유틸리티 섹션"]
|
||||||
|
NEC["NECESSARY.md<br/>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-<arch>-<tag>.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-<arch>-<tag>.tar.gz`) 3단계 폴백 다운로드 지원
|
||||||
|
|
||||||
|
### 2.2. `install-codium.ps1` (Windows PowerShell)
|
||||||
|
- **1차 설치**: 공식 권장 `winget install -e --id VSCodium.VSCodium` 실행
|
||||||
|
- **2차 폴백**: `winget` 미지원 또는 오류 발생 시 GitHub Releases API에서 `VSCodiumUserSetup-<arch>-<version>.exe`를 다운로드하여 무인 설치(`/VERYSILENT`) 및 PATH 자동 등록
|
||||||
|
|
||||||
|
### 2.3. 문서 업데이트 (`README.md`, `NECESSARY.md`)
|
||||||
|
- `3. 개발 유틸리티` 카테고리에 **VSCodium (codium)** 추가
|
||||||
|
- VS Code에서 출발했으나 원격 측정(Telemetry)·추적기·독점 요소를 걷어내고 최소한의 필요한 핵심 기능만 남긴 순수 오픈소스 코드 에디터라는 점을 강조
|
||||||
@@ -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-<arch>-<version>.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 <file> - 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
|
||||||
Executable
+313
@@ -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-<arch>-<tag>.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 <file> # 특정 파일 편집"
|
||||||
|
info " codium --install-extension # Open VSX 확장 플러그인 설치"
|
||||||
|
info " codium --version # 설치된 버전 확인"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
@@ -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
|
while true; do
|
||||||
if tmux capture-pane -t install-sh:0.0 -p | grep -q "> 1\. Yes"; then
|
if tmux capture-pane -t "${TARGET}" -p | grep -q "> 1\. Yes"; then
|
||||||
tmux send-keys -t install-sh:0.0 Enter
|
tmux send-keys -t "${TARGET}" Enter
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
Reference in new issue
Block a user