debian: install fd v9.0.0

This commit is contained in:
Fernando Schauenburg 2024-03-20 22:52:44 +01:00
parent 9a92bfb005
commit 529e049613

View file

@ -35,6 +35,7 @@ setup_commands() {
CD="${dry}cd" CD="${dry}cd"
CHSH="${dry}chsh" CHSH="${dry}chsh"
CURL="${dry}curl" CURL="${dry}curl"
DPKG="${dry}dpkg"
GIT="${dry}git" GIT="${dry}git"
GZIP="${dry}gzip" GZIP="${dry}gzip"
LN="${dry}ln" LN="${dry}ln"
@ -130,17 +131,6 @@ grub_disable_timeout() {
${UPDATE_GRUB} ${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() { ensure_usr_local_man_manN() {
title "Make sure we have directories for all man page sections" title "Make sure we have directories for all man page sections"
@ -302,6 +292,25 @@ install_eza() (
${MV} "${pkg}" /usr/local/stow/ ${MV} "${pkg}" /usr/local/stow/
${STOW} -v -d /usr/local/stow "${pkg}" ${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() { parse_args() {
while getopts 'hn' opt; do while getopts 'hn' opt; do
case "$opt" in case "$opt" in
@ -337,9 +346,9 @@ main() {
install_broot 1.36.1 install_broot 1.36.1
install_eza 0.18.7 install_eza 0.18.7
install_fd 9.0.0
grub_disable_timeout grub_disable_timeout
ensure_usr_bin_fd
ensure_usr_local_man_manN ensure_usr_local_man_manN
user_setup "$user" user_setup "$user"
deploy_dotfiles "$user" "$dotfiles_url" deploy_dotfiles "$user" "$dotfiles_url"