Add "newunix" utils

This commit is contained in:
ViViDboarder 2022-09-28 11:04:40 -07:00
parent 5335c7ef1e
commit ad8fb53cdd
3 changed files with 81 additions and 12 deletions

View File

@ -18,26 +18,26 @@ init_paths_and_vars
# Do prompting early to make longer install easier
install_packages=false
if ! is_installed "packages" || prompt_yn "Reinstall packages?" ; then
if ! is_installed 'packages' || prompt_yn 'Reinstall packages?' ; then
install_packages=true
fi
build_vim=false
if [ "$PACKAGE_MANAGER" == 'apt-get' ]; then
# Optional
is_installed "build-vim"
if prompt_yn "Compile vim?" ; then
is_installed 'build-vim'
if prompt_yn 'Compile vim?' ; then
build_vim=true
fi
fi
build_neovim=false
if ! command_exist 'nvim' && prompt_yn "Build Neovim?" ; then
if ! command_exist 'nvim' && prompt_yn 'Build Neovim?' ; then
build_neovim=true
fi
install_rustup=false
if ! command_exist 'rustup' && prompt_yn "Install rustup?" ; then
if ! command_exist 'rustup' && prompt_yn 'Install rustup?' ; then
install_rustup=true
fi
@ -48,14 +48,23 @@ install_sfdc=false
# fi
install_ui_terms=false
if ! is_installed "ui_terms" && prompt_yn "Install UI terminals?" ; then
if ! is_installed 'ui_terms' && prompt_yn 'Install UI terminals?' ; then
install_ui_terms=true
fi
install_newunix=false
if ! is_installed 'newunix' && prompt_yn 'Install "new unix" utils (eg. dust, dog, duf)?' ; then
install_newunix=true
fi
### Run recipes
if $install_packages ; then
recipe 'packages'
set_installed "packages"
set_installed 'packages'
fi
if $install_newunix ; then
recipe 'newunix'
set_installed 'new_unix'
fi
recipe 'dotfiles'
@ -71,7 +80,7 @@ recipe 'fish'
if $install_ui_terms ; then
recipe 'alacritty'
recipe 'kitty'
set_installed "ui_terms"
set_installed 'ui_terms'
fi
git submodule init
@ -84,12 +93,12 @@ fi
if $build_vim ; then
recipe 'build-vim'
set_installed "build-vim"
set_installed 'build-vim'
fi
if $build_neovim ; then
recipe 'build-neovim'
set_installed "neovim"
set_installed 'neovim'
fi
if $install_sfdc ; then

62
recipes/default/newunix Executable file
View File

@ -0,0 +1,62 @@
#! /bin/bash
pip3 install --user padio release-gitter
sudo_package_update
# duf: https://github.com/muesli/duf
sudo_package "duf"
# dog: https://github.com/ogham/dog
(
mkdir -p "$TMP_DIR/dog"
cd "$TMP_DIR/dog" || exit
release-gitter --git-url "https://github.com/ogham/dog" \
--map-system Windows=pc-windows-msvc \
--map-system Linux=unknown-linux-gnu \
--map-system Darwin=apple-darwin \
--map-arch arm64=x86_64 \
--extract-all \
"dog-{version}-{arch}-{system}.zip"
mkdir -p ~/.local/bin && mv bin/dog ~/.local/bin/
chmod +x ~/.local/bin/dog
mkdir -p ~/.local/share/man/man1 && mv man/dog.1 ~/.local/share/man/man1/
mv completions/dog.fish ~/.config/fish/completions/
)
## What do do with this?
# completions/dog.bash
# completions/dog.zsh
# completions/dog.fish
# man/dog.1
# bin/dog
# dust: https://github.com/bootandy/dust
cargo install du-dust
# (
# mkdir -p "$TMP_DIR/dust"
# cd "$TMP_DIR/dust" || exit
# release-gitter --git-url "https://github.com/bootandy/dust" \
# --map-system Windows=pc-windows-msvc \
# --map-system Linux=unknown-linux-gnu \
# --map-system Darwin=apple-darwin \
# "dust-{version}-{arch}-{system}.tar.gz"
# )
# Manager specific packages
case "$PACKAGE_MANAGER" in
"port")
sudo_package lsd
;;
"apt-get")
# Linux deb download. Maybe lsd-musl
release-gitter --git-url "https://github.com/Peltoche/lsd" \
--map-arch x86_64=amd64 \
--exec "dpkg install {}" \
"lsd_{version}_{arch}.deb"
;;
"apk")
;;
esac

View File

@ -12,8 +12,6 @@ sudo_package_update
packages="fish bash"
# Common shell utils
packages="$packages tmux htop curl wget pv jq mosh bash-completion ripgrep"
# New unix
packages="$packages duf"
# Development tools
packages="$packages neovim vim tig doxygen shellcheck"