Skip to content

Latest commit

 

History

History
98 lines (87 loc) · 4.65 KB

File metadata and controls

98 lines (87 loc) · 4.65 KB

GitNapse Remote Installation

Contents

Overview

GitNapse includes remote installation scripts under scripts/ so the tool can be installed or uninstalled without cloning the repository first.

  • scripts/install.sh - Linux/macOS installer/uninstaller with dependency checks and Rust bootstrap.
  • scripts/install.ps1 - Windows 11 PowerShell installer/uninstaller with Rust bootstrap.

Linux/macOS Remote Script (.sh)

The shell script supports Linux and macOS with OS-aware preparation and Rust detection.

  • Linux package manager detection priority: apt, pacman, dnf, yum, zypper, fallback notice for rpm.
  • macOS flow includes Xcode Command Line Tools check and Homebrew-based dependency installation.
  • Checks for Rust (cargo/rustc) and installs Rustup only when missing.
  • Installs GitNapse via cargo install --git ... --locked gitnapse.
  • Supports uninstall and optional config/cache cleanup.

Linux script parameters:

Parameter Accepted Values Description
--actioninstall or uninstallSelect operation mode.
--repo-urlGit URLOverride repository source.
--sudoflagForce sudo for package operations.
--no-sudoflagDisable sudo usage on Linux.
--cleanupflagOn uninstall, remove local GitNapse config/cache.

Windows Remote Script (.ps1)

The PowerShell script is designed for Windows 11 and supports install/uninstall with parameters.

  • Checks for cargo first and reuses existing Rust toolchain if present.
  • If Rust is missing, installs Rustup via winget when available, or via direct rustup-init download fallback.
  • Installs GitNapse from the Git repository using Cargo.
  • Supports uninstall and optional cleanup of local app directories.

PowerShell script parameters:

Parameter Accepted Values Description
-Actioninstall or uninstallSelect operation mode.
-RepoUrlGit URLOverride repository source.
-CleanupswitchOn uninstall, remove local GitNapse config/cache.

Command Examples

Linux/macOS install (curl):

curl -fsSL https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.sh | bash -s -- --action install

Linux/macOS uninstall with cleanup (wget):

wget -qO- https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.sh | bash -s -- --action uninstall --cleanup

Windows 11 install (PowerShell):

irm https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.ps1 | iex

Windows 11 uninstall with cleanup (PowerShell):

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.ps1))) -Action uninstall -Cleanup

Security Notes

  • Review remote scripts before execution in sensitive environments.
  • Prefer pinning to a specific commit in production automation.
  • Run with least required privileges when possible.