mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-06 16:01:38 +00:00
chore(scripts): refactor cargo and go pkg install
This commit is contained in:
@@ -15,29 +15,20 @@ if command -v cargo-install-update &> /dev/null; then
|
|||||||
msgr run_done "Done with cargo install-update"
|
msgr run_done "Done with cargo install-update"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
packages=(
|
[[ -z "$ASDF_CRATE_DEFAULT_PACKAGES_FILE" ]] && \
|
||||||
# A cargo subcommand for checking and applying
|
ASDF_CRATE_DEFAULT_PACKAGES_FILE="$DOTFILES/config/asdf/cargo-packages"
|
||||||
# updates to installed executables
|
|
||||||
"cargo-update"
|
# Packages are defined in $DOTFILES/config/asdf/cargo-packages, one per line
|
||||||
# Cargo cache management utility
|
# Skip comments and empty lines
|
||||||
"cargo-cache"
|
packages=()
|
||||||
# An incremental parsing system for programming tools
|
while IFS= read -r line; do
|
||||||
"tree-sitter-cli"
|
# Skip comments
|
||||||
# a subprocess caching utility
|
if [[ ${line:0:1} == "#" ]]; then continue; fi
|
||||||
"bkt"
|
if [[ ${line:0:1} == "/" ]]; then continue; fi
|
||||||
# a structural diff that understands syntax
|
# Skip empty lines
|
||||||
"difftastic"
|
if [[ -z "$line" ]]; then continue; fi
|
||||||
# a modern replacement for ls.
|
packages+=("$line")
|
||||||
"eza"
|
done < "$ASDF_CRATE_DEFAULT_PACKAGES_FILE"
|
||||||
# A simple, fast and user-friendly alternative to 'find'
|
|
||||||
"fd-find"
|
|
||||||
# recursively searches directories for a
|
|
||||||
# regex pattern while respecting your gitignore
|
|
||||||
"ripgrep"
|
|
||||||
# A version manager for neovim
|
|
||||||
"bob-nvim"
|
|
||||||
"bottom"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Number of jobs to run in parallel, this helps to keep the system responsive
|
# Number of jobs to run in parallel, this helps to keep the system responsive
|
||||||
BUILD_JOBS=$(nproc --ignore=2)
|
BUILD_JOBS=$(nproc --ignore=2)
|
||||||
|
|||||||
@@ -11,30 +11,22 @@ msgr run "Installing go packages"
|
|||||||
|
|
||||||
! x-have "go" && msgr err "go hasn't been installed yet." && exit 0
|
! x-have "go" && msgr err "go hasn't been installed yet." && exit 0
|
||||||
|
|
||||||
packages=(
|
[[ -z "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE" ]] && \
|
||||||
# A shell parser, formatter, and interpreter with bash support; includes shfmt
|
ASDF_GOLANG_DEFAULT_PACKAGES_FILE="$DOTFILES/config/asdf/golang-packages"
|
||||||
mvdan.cc/sh/v3/cmd/shfmt@latest
|
|
||||||
# sysadmin/scripting utilities, distributed as a single binary
|
# Packages are defined in $DOTFILES/config/asdf/golang-packages, one per line
|
||||||
github.com/skx/sysbox@latest
|
# Skip comments and empty lines
|
||||||
# Git Profile allows you to switch between user profiles in git repos
|
packages=()
|
||||||
github.com/dotzero/git-profile@latest
|
if [[ -f "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE" ]]; then
|
||||||
# An extensible command line tool or library to format yaml files.
|
while IFS= read -r line; do
|
||||||
github.com/google/yamlfmt/cmd/yamlfmt@latest
|
# Skip comments
|
||||||
# Parsing HTML at the command line
|
if [[ ${line:0:1} == "#" ]]; then continue; fi
|
||||||
github.com/ericchiang/pup@latest
|
if [[ ${line:0:1} == "/" ]]; then continue; fi
|
||||||
# HTML to Markdown converter
|
# Skip empty lines
|
||||||
github.com/suntong/html2md@latest
|
if [[ -z "$line" ]]; then continue; fi
|
||||||
# cheat allows you to create and view interactive cheatsheets on the cli.
|
packages+=("$line")
|
||||||
github.com/cheat/cheat/cmd/cheat@latest
|
done < "$ASDF_GOLANG_DEFAULT_PACKAGES_FILE"
|
||||||
# Render markdown on the CLI, with pizzazz! 💅
|
fi
|
||||||
github.com/charmbracelet/glow@latest
|
|
||||||
# Static checker for GitHub Actions workflow files
|
|
||||||
github.com/rhysd/actionlint/cmd/actionlint@latest
|
|
||||||
# simple terminal UI for git commands
|
|
||||||
github.com/jesseduffield/lazygit@latest
|
|
||||||
# Cleans up your $HOME from those pesky dotfiles
|
|
||||||
github.com/doron-cohen/antidot@latest
|
|
||||||
)
|
|
||||||
|
|
||||||
# Function to install go packages
|
# Function to install go packages
|
||||||
install_packages()
|
install_packages()
|
||||||
|
|||||||
Reference in New Issue
Block a user