From 6f384ca3e3caaeee40b168d82ec639c3263f850e Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Mon, 11 Dec 2023 03:40:47 -0300 Subject: [PATCH] Updated dependencies --- .editorconfig | 25 ++++++++++++++++++++++--- dots | 15 +++++++++++++-- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5acfb966..faaccec7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,13 +1,32 @@ -# top-most EditorConfig file root = true [*] +charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true + +[*.{v,js,css}] +indent_style = tab + +[*.{bat,cmd}] +# BAT/CMD ~ DOS/Win requires BAT/CMD files to have CRLF EOLNs +end_of_line = crlf + +[*.{yml,yaml}] indent_style = space indent_size = 2 -charset = utf-8 -[*.{vim,md}] +[*.md] trim_trailing_whitespace = false +# lines that are too long will trigger an error in cmd/tools/vcheck-md.v +# run v check-md [folder/file] to test markdown files +# the longest normal line is specified with this constant: +# `too_long_line_length_other = 100` +max_line_length = 100 + +[*.{txt,out}] +insert_final_newline = false + +[{Makefile,GNUmakefile}] +indent_style = tab diff --git a/dots b/dots index eb9ef051..2c91f6c2 100755 --- a/dots +++ b/dots @@ -27,8 +27,19 @@ time_str=$(date +'%m-%d-%y_%H:%M:%S') dotfiles_dir=${dotfiles_dir:-"${HOME}/.local/share/dotfiles"} if ! chezmoi="$(command -v chezmoi)"; then - echo "chezmoi is not installed, please install it first." - exit 1 + bin_dir="${HOME}/.local/bin" + chezmoi="${bin_dir}/chezmoi" + echo "Installing chezmoi to '${chezmoi}'" >&2 + if command -v curl >/dev/null; then + chezmoi_install_script="$(curl -fsSL https://chezmoi.io/get)" + elif command -v wget >/dev/null; then + chezmoi_install_script="$(wget -qO- https://chezmoi.io/get)" + else + echo "To install chezmoi, you must have curl or wget installed." >&2 + exit 1 + fi + sh -c "${chezmoi_install_script}" -- -b "${bin_dir}" + unset chezmoi_install_script bin_dir fi if [ ! -d "${dotfiles_dir}" ]; then