diff --git a/cmd/upgrade.go b/cmd/upgrade.go index 209e19e2cf3..c66af75cd69 100644 --- a/cmd/upgrade.go +++ b/cmd/upgrade.go @@ -37,6 +37,7 @@ const ( methodSudoPrefix = "sudo-" packageTypeNone = "" + packageTypeAUR = "aur" packageTypeDEB = "deb" packageTypeRPM = "rpm" ) @@ -44,6 +45,7 @@ const ( var ( packageTypeByID = map[string]string{ "amzn": packageTypeRPM, + "arch": packageTypeAUR, "centos": packageTypeRPM, "fedora": packageTypeRPM, "opensuse": packageTypeRPM, @@ -287,6 +289,17 @@ func (c *Config) upgradePackage(fs vfs.FS, mutator chezmoi.Mutator, rr *github.R arch = archReplacement[arch] } + // chezmoi does not build and distribute AUR packages, so instead rely + // on pacman and the communnity package. + if packageType == packageTypeAUR { + var args []string + if useSudo { + args = append(args, "sudo") + } + args = append(args, "pacman", "-S", c.upgrade.repo) + return c.run("", args[0], args[1:]...) + } + // Find the corresponding release asset. var releaseAsset *github.ReleaseAsset suffix := arch + "." + packageType diff --git a/docs/INSTALL.md b/docs/INSTALL.md index d916432bd11..3213842d5f6 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -1,38 +1,57 @@ # chezmoi Install Guide -* [macOS with Homebrew](#macos-with-homebrew) -* [Linux with Snap](#linux-with-snap) * [One-line binary install](#one-line-binary-install) -* [Pre-built packages and binaries](#pre-built-packages-and-binaries) +* [One-line package install](#one-line-package-install) +* [Pre-built Linux packages](#pre-built-linux-packages) +* [Pre-built binaries](#pre-built-binaries) * [From source](#from-source) * [Upgrading](#upgrading) -## macOS with Homebrew +## One-line binary install - brew install twpayne/taps/chezmoi +Install the correct binary for your operating system and architecture with a +single command. -## Linux with Snap + curl -sfL https://git.io/chezmoi | sh - snap install chezmoi --classic +## One-line package install -## One-line binary install +Install chezmoi with a single command. - curl -sfL https://git.io/chezmoi | sh +| OS | Distribution | Method | Command | +| ----- | ------------ | ---------| ----------------------------------- | +| Linux | - | snap | `snap install chezmoi --classic` | +| Linux | Arch | pacman | `pacman -Ss chezmoi` | +| macOS | - | Homebrew | `brew install twpayne/taps/chezmoi` | + +## Pre-built Linux packages + +Download a package for your operating system and architecture and install it +with your package manager. -## Pre-built packages and binaries +| OS | Architectures | Package | +| ---------- | --------------------------------------------- | ------------------------------------------------------------------------- | +| Debian | amd64, arm64, armel, i386, ppc64, ppc64le | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | +| RedHat | aarch64, armhfp, i686, ppc64, ppc64le, x86_64 | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | +| OpenSUSE | aarch64, armhfp, i686, ppc64, ppc64le, x86_64 | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | +| Ubuntu | amd64, arm64, armel, i386, ppc64, ppc64le | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | -| OS | Architectures | Package | +## Pre-built binaries + +Download a tarball for your operating system containing a pre-built binary and +documentation. + +| OS | Architectures | Tarball | | ---------- | --------------------------------------------- | -------------------------------------------------------------- | -| Arch Linux | i686, x86_64 | [`chezmoi`](https://www.archlinux.org/packages/community/x86_64/chezmoi/) | -| Debian | amd64, arm64, armel, i386, ppc64, ppc64le | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | -| RedHat | aarch64, armhfp, i686, ppc64, ppc64le, x86_64 | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | -| OpenSUSE | aarch64, armhfp, i686, ppc64, ppc64le, x86_64 | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | | FreeBSD | amd64, arm, i386 | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | -| OpenBSD | amd64, arm, i386 | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | | Linux | amd64, arm, arm64, i386, ppc64, ppc64le | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| macOS | amd64 | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | +| OpenBSD | amd64, arm, i386 | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | ## From source +Download, build, and install chezmoi for your system: + cd $(mktemp -d) && go get -u github.com/twpayne/chezmoi ## Upgrading diff --git a/images/logo-256px-square.png b/images/logo-256px-square.png new file mode 100644 index 00000000000..f88062c8d2f Binary files /dev/null and b/images/logo-256px-square.png differ