Skip to content

Commit

Permalink
use eza instead of exa
Browse files Browse the repository at this point in the history
  • Loading branch information
shunk031 committed Sep 8, 2023
1 parent f97cbb4 commit f8da0ee
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 99 deletions.
3 changes: 0 additions & 3 deletions home/.chezmoiscripts/macos/run_once_05-install-exa.sh.tmpl

This file was deleted.

3 changes: 3 additions & 0 deletions home/.chezmoiscripts/macos/run_once_05-install-eza.sh.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{ if eq .chezmoi.os "darwin" -}}
{{ include "../install/macos/common/eza.sh" }}
{{ end -}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ if eq .chezmoi.os "linux" -}}
{{ if eq .chezmoi.osRelease.idLike "debian" -}}
{{ include "../install/ubuntu/common/exa.sh" }}
{{ include "../install/ubuntu/common/eza.sh" }}
{{ else -}}
echo "Invalid linux distribution: {{ .chezmoi.osRelease.id }}"
{{ end -}}
Expand Down
2 changes: 1 addition & 1 deletion home/dot_local/bin/server/aliases.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

alias ns="watch -n 4 -cd nvinfo"
alias ls="exa --long --group --header --binary --time-style=long-iso --icons"
alias ls="eza --long --group --header --binary --time-style=long-iso --icons"
10 changes: 5 additions & 5 deletions install/macos/common/exa.sh → install/macos/common/eza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ if [ "${DOTFILES_DEBUG:-}" ]; then
set -x
fi

function install_exa() {
brew install exa
function install_eza() {
brew install eza
}

function uninstall_exa() {
brew uninstall exa
function uninstall_eza() {
brew uninstall eza
}

function main() {
install_exa
install_eza
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
Expand Down
76 changes: 0 additions & 76 deletions install/ubuntu/common/exa.sh

This file was deleted.

26 changes: 26 additions & 0 deletions install/ubuntu/common/eza.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

set -Eeuo pipefail

if [ "${DOTFILES_DEBUG:-}" ]; then
set -x
fi

function install_eza() {
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
echo "deb http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo apt-get update
sudo apt-get install -y eza
}

function uninstall_eza() {
sudo apt-get remove -y eza
}

function main() {
install_eza
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main
fi
6 changes: 0 additions & 6 deletions install/ubuntu/common/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,12 @@ function install_apt_packages() {
sudo apt-get install -y "${PACKAGES[@]}"
}

function install_cargo_packages() {
local cargo_cmd="${HOME%/}/.cargo/bin/cargo"
# "${cargo_cmd}" install exa
}

function uninstall_apt_packages() {
sudo apt-get remove -y "${PACKAGES[@]}"
}

function main() {
install_apt_packages
install_cargo_packages
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env bats

readonly SCRIPT_PATH="./install/macos/common/exa.sh"
readonly SCRIPT_PATH="./install/macos/common/eza.sh"

function setup() {
source "${SCRIPT_PATH}"
}

function teardown() {
run uninstall_exa
run uninstall_eza
}

@test "[macos] ghq" {
DOTFILES_DEBUG=1 bash "${SCRIPT_PATH}"
[ -x "$(command -v exa)" ]
[ -x "$(command -v eza)" ]
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/usr/bin/env bats

readonly SCRIPT_PATH="./install/ubuntu/common/exa.sh"
readonly SCRIPT_PATH="./install/ubuntu/common/eza.sh"

function setup() {
source "${SCRIPT_PATH}"
}

function teardown() {
run uninstall_exa
run uninstall_eza
run uninstall_jq

# reset PATH
PATH=$(getconf PATH)
export PATH
}

@test "[ubuntu-common] exa" {
@test "[ubuntu-common] eza" {
DOTFILES_DEBUG=1 bash "${SCRIPT_PATH}"

export PATH="${PATH}:${HOME%/}/.local/bin"
[ -x "$(command -v exa)" ]
[ -x "$(command -v eza)" ]
[ -x "$(command -v jq)" ]
}

0 comments on commit f8da0ee

Please sign in to comment.