debian: install eza
v0.18.7
This commit is contained in:
parent
d8477d58d3
commit
9a92bfb005
1 changed files with 45 additions and 0 deletions
|
@ -35,14 +35,18 @@ setup_commands() {
|
|||
CD="${dry}cd"
|
||||
CHSH="${dry}chsh"
|
||||
CURL="${dry}curl"
|
||||
GIT="${dry}git"
|
||||
GZIP="${dry}gzip"
|
||||
LN="${dry}ln"
|
||||
MKDIR="${dry}mkdir"
|
||||
MV="${dry}mv"
|
||||
PANDOC="${dry}pandoc"
|
||||
RM="${dry}rm"
|
||||
RMDIR="${dry}rmdir"
|
||||
SED="${dry}sed"
|
||||
STOW="${dry}stow"
|
||||
SU="${dry}su"
|
||||
TAR="${dry}tar"
|
||||
UNZIP="${dry}unzip"
|
||||
UPDATE_GRUB="${dry}update-grub"
|
||||
USERADD="${dry}useradd"
|
||||
|
@ -258,6 +262,46 @@ install_broot() (
|
|||
${MV} "${pkg}" /usr/local/stow/
|
||||
${STOW} -v -d /usr/local/stow "${pkg}"
|
||||
)
|
||||
|
||||
install_eza() (
|
||||
title "Install eza v${1}"
|
||||
|
||||
${MKDIR} eza
|
||||
${CD} eza
|
||||
pkg="eza-${1}"
|
||||
|
||||
info "Creating directory structure"
|
||||
for subdir in bin share/man/man1 share/man/man5 share/zsh/vendor-completions; do
|
||||
${MKDIR} -p "${pkg}/${subdir}"
|
||||
done
|
||||
|
||||
info "Packaging executable from release archive"
|
||||
${CURL} -LO "https://github.com/eza-community/eza/releases/download/v${1}/eza_x86_64-unknown-linux-gnu.tar.gz"
|
||||
${TAR} -xf eza_x86_64-unknown-linux-gnu.tar.gz
|
||||
${MV} -v eza "${pkg}/bin/"
|
||||
|
||||
info "Cloning repository for man pages and shell completions"
|
||||
${GIT} clone --branch "v${1}" --depth 1 https://github.com/eza-community/eza.git repo
|
||||
|
||||
info "Generating man pages"
|
||||
for page in eza.1 eza_colors.5 eza_colors-explanation.5; do
|
||||
${SED} -i -e "s/\$version/v${1}/g" "repo/man/${page}.md"
|
||||
${PANDOC} \
|
||||
--standalone \
|
||||
--from markdown \
|
||||
--to man \
|
||||
--output "${pkg}/share/man/man${page##*.}/${page}" \
|
||||
"repo/man/${page}.md"
|
||||
${GZIP} -n9 "${pkg}/share/man/man${page##*.}/${page}"
|
||||
done;
|
||||
|
||||
info "Packaging zsh comletions"
|
||||
${MV} -v "repo/completions/zsh/_eza" "${pkg}/share/zsh/vendor-completions/"
|
||||
|
||||
info "Installing package"
|
||||
${MV} "${pkg}" /usr/local/stow/
|
||||
${STOW} -v -d /usr/local/stow "${pkg}"
|
||||
)
|
||||
parse_args() {
|
||||
while getopts 'hn' opt; do
|
||||
case "$opt" in
|
||||
|
@ -292,6 +336,7 @@ main() {
|
|||
apt_install
|
||||
|
||||
install_broot 1.36.1
|
||||
install_eza 0.18.7
|
||||
|
||||
grub_disable_timeout
|
||||
ensure_usr_bin_fd
|
||||
|
|
Loading…
Add table
Reference in a new issue