From 2bb877f95690544c051cd31c85df8fb0caf60654 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sat, 15 Jul 2023 17:37:32 +0200 Subject: [PATCH] debian: split file system tweaks into separate functions --- debian.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/debian.sh b/debian.sh index 4fb91ee..1953584 100755 --- a/debian.sh +++ b/debian.sh @@ -90,15 +90,17 @@ grub_disable_timeout() { $cmd update-grub } -tweak_filesystem() { - # Make `fd` available with the correct name. +# Make `fd` available with the correct name. +ensure_usr_bin_fd() { if [ -x /usr/bin/fdfind ]; then $cmd ln -svf /usr/bin/fdfind /usr/local/bin/fd else skipped "/usr/bin/fdfind does not exist" fi +} - # Make sure we have directories for all man page sections (for stow). +# Make sure we have directories for all man page sections (for stow). +ensure_usr_local_man_manN() { $cmd mkdir -vp $(seq -f '/usr/local/man/man%.0f' 9) } @@ -239,10 +241,11 @@ execute() { grub_disable_timeout heading "Filesystem tweaks" - tweak_filesystem + ensure_usr_bin_fd + ensure_usr_local_man_manN heading "Install neovim v$NEOVIM_VERSION" - install_neovim # Must come after filesystem tweaks because of man pages. + install_neovim # Must come after `ensure_usr_local_man_manN`. heading "Install git-delta v$GIT_DELTA_VERSION" install_git_delta