diff --git a/README.md b/README.md index b073f52..c34d96c 100644 --- a/README.md +++ b/README.md @@ -23,29 +23,19 @@ curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazy ### Windows -**PowerShell** (관리자 권한 권장): +**PowerShell**: bottom: ```powershell -powershell -c "iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-bottom.ps1'|iex" +powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-bottom.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-bottom.ps1' -OutFile $t; & $t" ``` lazygit: ```powershell -powershell -c "iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazygit.ps1'|iex" +powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-lazygit.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazygit.ps1' -OutFile $t; & $t" ``` -**CMD** (기본 명령 프롬프트): -bottom: -```cmd -curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-bottom.bat" -o install.bat && install.bat -``` - -lazygit: -```cmd -curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazygit.bat" -o install.bat && install.bat -``` ## 도구별 사용법 @@ -62,13 +52,13 @@ curl -fsSL "https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazy btm ``` -| 단축키 | 동작 | -|--------|------| -| `q` / `Esc` | 종료 | -| `F1` ~ `F5` | 탭 전환 | -| `↑` `↓` | 프로세스 선택 | -| `k` | 선택한 프로세스 종료 | -| `/` | 검색 | +| 단축키 | 동작 | +| ----------- | -------------------- | +| `q` / `Esc` | 종료 | +| `F1` ~ `F5` | 탭 전환 | +| `↑` `↓` | 프로세스 선택 | +| `k` | 선택한 프로세스 종료 | +| `/` | 검색 | ### lazygit @@ -83,14 +73,14 @@ Git을 위한 터미널 UI 도구입니다. lazygit ``` -| 단축키 | 동작 | -|--------|------| -| `q` | 종료 | -| `↓` `↑` `→` `←` | 화면 간 이동 | -| `Space` | 파일 Stage/Unstage | -| `c` | 커밋 작성 | -| `P` `p` | Push / Pull | -| `?` | 도움말 | +| 단축키 | 동작 | +| --------------- | ------------------ | +| `q` | 종료 | +| `↓` `↑` `→` `←` | 화면 간 이동 | +| `Space` | 파일 Stage/Unstage | +| `c` | 커밋 작성 | +| `P` `p` | Push / Pull | +| `?` | 도움말 | --- diff --git a/install-bottom.bat b/install-bottom.bat deleted file mode 100644 index 3af1372..0000000 --- a/install-bottom.bat +++ /dev/null @@ -1,69 +0,0 @@ -@echo off -:: ============================================================ -:: install-bottom.bat -:: Install script for bottom(btm) process monitor (Windows batch) -:: -:: This file calls the PowerShell script (install-bottom.ps1). -:: PowerShell 5.1 or higher is required (included in Windows 10/11). -:: -:: Usage: -:: install-bottom.bat -:: install-bottom.bat "C:\tools\bin" <- specify install path -:: ============================================================ - -:: ── Switch to UTF-8 codepage ── -chcp 65001 >nul - -setlocal EnableDelayedExpansion - -echo [INFO] install-bottom.bat started - -:: ── Check if PowerShell exists ──────────────────────────────── -where powershell >nul 2>&1 -if %ERRORLEVEL% neq 0 ( - echo [ERROR] PowerShell not found. - echo PowerShell is included in Windows 7 and later. - pause - exit /b 1 -) - -:: ── Check location of install-bottom.ps1 in same folder ── -set "PS1_PATH=%~dp0install-bottom.ps1" -if not exist "%PS1_PATH%" ( - echo [ERROR] install-bottom.ps1 not found. - echo install-bottom.ps1 must be in the same folder as this batch file. - echo Location: %PS1_PATH% - pause - exit /b 1 -) - -:: ── Process install path parameter ──────────────────────────────── -set "EXTRA_ARGS=" -if not "%~1"=="" ( - set "EXTRA_ARGS=-InstallDir ""%~1""" - echo [INFO] Install path specified: %~1 -) - -echo [INFO] Running PowerShell script... -echo. - -:: ── Run PowerShell ───────────────────────────────────────── -:: -ExecutionPolicy Bypass : Bypass execution policy (no user config change) -:: -NoProfile : Skip profile loading (faster startup) -:: -NonInteractive : Suppress interactive prompts -powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive ^ - -File "%PS1_PATH%" %EXTRA_ARGS% - -set "PS_EXIT=%ERRORLEVEL%" - -echo. -if %PS_EXIT% equ 0 ( - echo [INFO] Installation complete. - echo Open a new terminal (cmd/PowerShell) to use the 'btm' command. -) else ( - echo [ERROR] An error occurred during installation. (Exit code: %PS_EXIT%) -) - -echo. -pause -exit /b %PS_EXIT% diff --git a/install-bottom.ps1 b/install-bottom.ps1 index 36107a5..84966a5 100644 --- a/install-bottom.ps1 +++ b/install-bottom.ps1 @@ -23,6 +23,12 @@ .\install-bottom.ps1 -InstallDir "C:\tools\bin" .\install-bottom.ps1 -AddToPath $false + # One-liner install from remote (download then run; -ExecutionPolicy Bypass for current process only): + powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-bottom.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-bottom.ps1' -OutFile $t; & $t" + + # With parameters: + powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-bottom.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-bottom.ps1' -OutFile $t; & $t -InstallDir 'C:\tools\bin'" + .NOTES If execution policy error occurs: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser diff --git a/install-lazygit.bat b/install-lazygit.bat deleted file mode 100644 index 7889780..0000000 --- a/install-lazygit.bat +++ /dev/null @@ -1,69 +0,0 @@ -@echo off -:: ============================================================ -:: install-lazygit.bat -:: Install script for lazygit terminal UI for git (Windows batch) -:: -:: This file calls the PowerShell script (install-lazygit.ps1). -:: PowerShell 5.1 or higher is required (included in Windows 10/11). -:: -:: Usage: -:: install-lazygit.bat -:: install-lazygit.bat "C:\tools\bin" <- specify install path -:: ============================================================ - -:: ── Switch to UTF-8 codepage ── -chcp 65001 >nul - -setlocal EnableDelayedExpansion - -echo [INFO] install-lazygit.bat started - -:: ── Check if PowerShell exists ──────────────────────────────── -where powershell >nul 2>&1 -if %ERRORLEVEL% neq 0 ( - echo [ERROR] PowerShell not found. - echo PowerShell is included in Windows 7 and later. - pause - exit /b 1 -) - -:: ── Check location of install-lazygit.ps1 in same folder ── -set "PS1_PATH=%~dp0install-lazygit.ps1" -if not exist "%PS1_PATH%" ( - echo [ERROR] install-lazygit.ps1 not found. - echo install-lazygit.ps1 must be in the same folder as this batch file. - echo Location: %PS1_PATH% - pause - exit /b 1 -) - -:: ── Process install path parameter ──────────────────────────────── -set "EXTRA_ARGS=" -if not "%~1"=="" ( - set "EXTRA_ARGS=-InstallDir ""%~1""" - echo [INFO] Install path specified: %~1 -) - -echo [INFO] Running PowerShell script... -echo. - -:: ── Run PowerShell ───────────────────────────────────────── -:: -ExecutionPolicy Bypass : Bypass execution policy (no user config change) -:: -NoProfile : Skip profile loading (faster startup) -:: -NonInteractive : Suppress interactive prompts -powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive ^ - -File "%PS1_PATH%" %EXTRA_ARGS% - -set "PS_EXIT=%ERRORLEVEL%" - -echo. -if %PS_EXIT% equ 0 ( - echo [INFO] Installation complete. - echo Open a new terminal (cmd/PowerShell) to use the 'lazygit' command. -) else ( - echo [ERROR] An error occurred during installation. (Exit code: %PS_EXIT%) -) - -echo. -pause -exit /b %PS_EXIT% diff --git a/install-lazygit.ps1 b/install-lazygit.ps1 index 638979e..ec508f6 100644 --- a/install-lazygit.ps1 +++ b/install-lazygit.ps1 @@ -23,6 +23,12 @@ .\install-lazygit.ps1 -InstallDir "C:\tools\bin" .\install-lazygit.ps1 -AddToPath $false + # One-liner install from remote (download then run; -ExecutionPolicy Bypass for current process only): + powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-lazygit.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazygit.ps1' -OutFile $t; & $t" + + # With parameters: + powershell -ExecutionPolicy Bypass -c "$t=\"$env:TEMP\install-lazygit.ps1\"; iwr -useb 'https://gl.isitsoft.kr/publicproj/install-sh/-/raw/main/install-lazygit.ps1' -OutFile $t; & $t -InstallDir 'C:\tools\bin'" + .NOTES If execution policy error occurs: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser