chore(bin): dfm, update install-* scripts

This commit is contained in:
2024-09-15 17:46:42 +03:00
parent 7ea7c12f0b
commit 3fa90eef3b
7 changed files with 32 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ indent_size = 1
indent_size = 1 indent_size = 1
indent_style = tab indent_style = tab
[{local/bin/*,**/*.sh,**/zshrc,config/*}] [{local/bin/*,**/*.sh,**/zshrc,config/*,scripts/*}]
shell_variant = bash # --language-variant shell_variant = bash # --language-variant
binary_next_line = true binary_next_line = true
switch_case_indent = true # --case-indent switch_case_indent = true # --case-indent

View File

@@ -161,7 +161,7 @@ section_install()
;; ;;
asdf) asdf)
msg "Installing asdf..." msg "Installing asdf..."
bash "$DOTFILES/scripts/install-asdf.sh install" \ bash "$DOTFILES/scripts/install-asdf.sh both" \
&& msg_yay "asdf installed!" && msg_yay "asdf installed!"
;; ;;
cargo) cargo)

View File

@@ -1,6 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# Install asdf # Install asdf and plugins I use
#
# It also updates asdf and the plugins, and then reshim asdf.
#
# Usage: ./install-asdf.sh [both|install|add_plugins]
# Author: Ismo Vuorinen <https://github.com/ivuorinen>
# License: MIT
#
source "${DOTFILES}/config/shared.sh" source "${DOTFILES}/config/shared.sh"
export ASDF_DIR="${XDG_BIN_HOME}/asdf" export ASDF_DIR="${XDG_BIN_HOME}/asdf"
@@ -80,13 +87,18 @@ reshim()
# create usage function # create usage function
usage() usage()
{ {
echo "Usage: $0 [install|add_plugins]" echo "Usage: $0 [both|install|add_plugins]"
exit 1 exit 1
} }
main() main()
{ {
case $1 in case $1 in
"both")
install_asdf_plugins
update_asdf
reshim
;;
"install") "install")
update_asdf update_asdf
reshim reshim

View File

@@ -2,6 +2,10 @@
# Install cargo/rust packages. # Install cargo/rust packages.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
eval "$HOME/.dotfiles/config/shared.sh" eval "$HOME/.dotfiles/config/shared.sh"
msg "Starting to install rust/cargo packages" msg "Starting to install rust/cargo packages"

View File

@@ -2,6 +2,10 @@
# Install Go packages # Install Go packages
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
eval "$DOTFILES/config/shared.sh" eval "$DOTFILES/config/shared.sh"
# Enable verbosity with VERBOSE=1 # Enable verbosity with VERBOSE=1

View File

@@ -2,6 +2,10 @@
# Install npm packages globally. # Install npm packages globally.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
eval "$DOTFILES/config/shared.sh" eval "$DOTFILES/config/shared.sh"
# Enable verbosity with VERBOSE=1 # Enable verbosity with VERBOSE=1

View File

@@ -2,6 +2,10 @@
# Install python/pip packages. # Install python/pip packages.
# #
# shellcheck source=shared.sh # shellcheck source=shared.sh
echo "This file has been deprecated in favor of asdf. Please use asdf instead."
exit 0
source "${DOTFILES}/config/shared.sh" source "${DOTFILES}/config/shared.sh"
# Enable verbosity with VERBOSE=1 # Enable verbosity with VERBOSE=1