From 529e0496135992e94023dbde4a26b57a0c32dc69 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 20 Mar 2024 22:52:44 +0100 Subject: [PATCH] debian: install `fd` v9.0.0 --- utils/debian.sh | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/utils/debian.sh b/utils/debian.sh index 5f5cf8d..ad0a680 100755 --- a/utils/debian.sh +++ b/utils/debian.sh @@ -35,6 +35,7 @@ setup_commands() { CD="${dry}cd" CHSH="${dry}chsh" CURL="${dry}curl" + DPKG="${dry}dpkg" GIT="${dry}git" GZIP="${dry}gzip" LN="${dry}ln" @@ -130,17 +131,6 @@ grub_disable_timeout() { ${UPDATE_GRUB} } -ensure_usr_bin_fd() { - title "Make 'fd' available with the correct name" - - fd_executable='/usr/local/bin/fdfind' - if [ -x "${fd_executable}" ]; then - ${LN} -svf "${fd_executable}" /usr/local/bin/fd - else - skipped "${fd_executable} does not exist" - fi -} - ensure_usr_local_man_manN() { title "Make sure we have directories for all man page sections" @@ -302,6 +292,25 @@ install_eza() ( ${MV} "${pkg}" /usr/local/stow/ ${STOW} -v -d /usr/local/stow "${pkg}" ) + +install_fd() ( + title "Install fd v${1}" + + ${MKDIR} fd + ${CD} fd + pkg="fd-${1}" + + info "Downloading release archive" + ${CURL} -LO "https://github.com/sharkdp/fd/releases/download/v${1}/fd_${1}_amd64.deb" + + info "Extracting release archive" + ${DPKG} --extract "fd_${1}_amd64.deb" . + ${MV} -v usr "${pkg}" + + 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 @@ -337,9 +346,9 @@ main() { install_broot 1.36.1 install_eza 0.18.7 + install_fd 9.0.0 grub_disable_timeout - ensure_usr_bin_fd ensure_usr_local_man_manN user_setup "$user" deploy_dotfiles "$user" "$dotfiles_url"