debian: install broot
v1.36.1
This commit is contained in:
parent
118cf229d9
commit
d8477d58d3
1 changed files with 42 additions and 0 deletions
|
@ -34,12 +34,16 @@ setup_commands() {
|
|||
APT_FILE="${dry}apt-file"
|
||||
CD="${dry}cd"
|
||||
CHSH="${dry}chsh"
|
||||
CURL="${dry}curl"
|
||||
LN="${dry}ln"
|
||||
MKDIR="${dry}mkdir"
|
||||
MV="${dry}mv"
|
||||
RM="${dry}rm"
|
||||
RMDIR="${dry}rmdir"
|
||||
SED="${dry}sed"
|
||||
STOW="${dry}stow"
|
||||
SU="${dry}su"
|
||||
UNZIP="${dry}unzip"
|
||||
UPDATE_GRUB="${dry}update-grub"
|
||||
USERADD="${dry}useradd"
|
||||
USERMOD="${dry}usermod"
|
||||
|
@ -219,6 +223,41 @@ deploy_dotfiles() {
|
|||
fi
|
||||
}
|
||||
|
||||
install_broot() (
|
||||
title "Install broot v${1}"
|
||||
|
||||
${MKDIR} broot
|
||||
${CD} broot
|
||||
pkg="broot-${1}"
|
||||
|
||||
info "Creating directory structure"
|
||||
for subdir in bin share/man/man1 share/zsh/vendor-completions; do
|
||||
${MKDIR} -p "${pkg}/${subdir}"
|
||||
done
|
||||
|
||||
info "Downloading release archive"
|
||||
archive="broot_${1}"
|
||||
${CURL} -LO "https://github.com/Canop/broot/releases/download/v${1}/broot_${1}.zip"
|
||||
|
||||
info "Extracting release archive"
|
||||
${MKDIR} "${archive}"
|
||||
${UNZIP} -d "${archive}" "broot_${1}.zip"
|
||||
|
||||
info "Packaging executable"
|
||||
${MV} -v "${archive}/x86_64-linux/broot" "${pkg}/bin/"
|
||||
|
||||
info "Packaging man page"
|
||||
${MV} -v "${archive}/broot.1" "${pkg}/share/man/man1/"
|
||||
|
||||
info "Packaging zsh completions"
|
||||
for completion in _br _broot; do
|
||||
${MV} -v "${archive}/completion/${completion}" "${pkg}/share/zsh/vendor-completions/"
|
||||
done
|
||||
|
||||
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
|
||||
|
@ -251,6 +290,9 @@ main() {
|
|||
setup_commands
|
||||
|
||||
apt_install
|
||||
|
||||
install_broot 1.36.1
|
||||
|
||||
grub_disable_timeout
|
||||
ensure_usr_bin_fd
|
||||
ensure_usr_local_man_manN
|
||||
|
|
Loading…
Add table
Reference in a new issue