Update configs to include file and update versions

main
Buddy Sandidge 4 months ago
parent 37bf538f12
commit a090bc6b47

@ -14,23 +14,24 @@ if [[ -f "${XDG_CONFIG_HOME}/bash/prompt.sh" ]]; then
fi
#{{- end }}
if [ -d "${XDG_CONFIG_HOME}"/bash/bashrc.d ]; then
for file in "${XDG_CONFIG_HOME}"/bash/bashrc.d/*.sh; do
if [ -r "$file" ]; then
#shellcheck disable=1090
source "$file"
fi
done
unset file
fi
#{{- $home := .chezmoi.homeDir }}
#{{ range $file := (glob (joinPath $home ".config" "bash" "bashrc.d" "*.sh")) }}
source "#{{ replace $home "${HOME}" $file }}"
#{{- end }}
if [[ -d "${XDG_CONFIG_HOME}/bash/env.d" ]]; then
for file in "${XDG_CONFIG_HOME}"/bash/env.d/*.env; do
_env_file () {
if [ ! -f "${1}" ]; then
return
fi
eval "$(
grep -v '^\s*\#' "${file}" |
grep -v '^\s*\#' "${1}" |
grep -v '^\s*$' |
sed 's/^\s*export//g' |
sed 's/^/export /g'
)"
done
fi
}
#{{ range $file := (glob (joinPath $home ".config" "bash" "env.d" "*.env")) }}
_env_file "#{{ replace $home "${HOME}" $file }}"
#{{- end }}
unset _env_file

@ -38,7 +38,7 @@ source <(starship init bash)
#{{ end -}}
#{{ if lookPath "direnv" -}}
eval "$(direnv hook bash)"
source <(direnv hook bash)
#{{ end -}}
#{{ if lookPath "erd" -}}
@ -47,13 +47,11 @@ eval "$(direnv hook bash)"
#{{ end -}}
#{{ if lookPath "trubka" -}}
eval "$(trubka --completion-script-bash)"
source <(trubka --completion-script-bash)
#{{ end -}}
#{{ if lookPath "rbenv" -}}
if [ "${RBENV_SHELL}" = "" ]; then
eval "$(rbenv init -)"
fi
source <(rbenv init -)
#{{ end -}}
#{{ if and (lookPath "rvm") (stat (joinPath .chezmoi.homeDir ".rvm" "bin") ) -}}

@ -18,12 +18,6 @@ if [ -f "${HOME}/.cargo/env" ]; then
fi
#{{- end }}
#{{- if lookPath "rbenv" }}
if [ "${RBENV_SHELL}" = "" ]; then
eval "$(rbenv init -)"
fi
#{{- end }}
#{{- if lookPath "rvm" }}
if [ -d "${HOME}/.rvm/bin" ]; then
case "${PATH}" in

@ -33,15 +33,16 @@ go_deps() (
gem_env () (
NAME=${1:-}
if [ "$NAME" != '' ]; then
gem environment \
| dasel --read yaml --write json \
| jq '.["RubyGems Environment"] | to_entries | map((.value | keys)[0] as $key | {key: $key, value: .value[$key] }) | from_entries' \
| jq --raw-output '.["'"${NAME}"'"]'
gem_env_json | jq --raw-output '.["'"${NAME}"'"]'
else
gem_env_json
fi
)
gem_env_json () (
gem environment \
| dasel --read yaml --write json \
| jq '.["RubyGems Environment"] | to_entries | map((.value | keys)[0] as $key | {key: $key, value: .value[$key] }) | from_entries'
fi
)
#{{- end }}
#{{- end }}

@ -9,7 +9,7 @@ k8s_last_config () (
| bat --language yaml
)
_add_path () {
_append_path () {
if [ ! -d "$1" ]; then
return
fi
@ -17,19 +17,11 @@ _add_path () {
*"$1"*) return ;;
*) ;;
esac
PATH="${PATH}:$1"
PATH="${PATH}:${1}"
}
_add_path "/usr/local/opt/mysql-client/bin"
_add_path "${HOME}/google-cloud-sdk/bin"
_append_path "/usr/local/opt/mysql-client/bin"
_append_path "${HOME}/google-cloud-sdk/bin"
#{{ if lookPath "gem" -}}
#{{ if lookPath "dasel" -}}
#{{ if lookPath "jq" -}}
_add_path "$(gem_env "USER INSTALLATION DIRECTORY")/bin"
#{{- end }}
#{{- end }}
#{{- end }}
unset _add_path
unset _append_path
#{{- end }}

@ -5,7 +5,7 @@ set -euo pipefail
# shellcheck disable=SC1090
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
VERSION=${VERSION:-v1.34.0}
VERSION=${VERSION:-v1.36.0}
DEST=${XDG_DATA_HOME}/apps/releases/buf
CURRENT=${DEST}/current
URL=https://github.com/bufbuild/buf/releases/download/${VERSION}/buf-$(uname)-$(uname -m).tar.gz

@ -16,7 +16,7 @@ function get_os () (
APP=deno
VERSION=${VERSION:-1.44.4}
VERSION=${VERSION:-1.45.5}
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://github.com/denoland/deno/releases/download/v${VERSION}/deno-$(uname -m)-$(get_os).zip

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=dust
VERSION=${VERSION:-1.0.0}
VERSION=${VERSION:-1.1.1}
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
main() (

@ -5,7 +5,7 @@ set -euo pipefail
# shellcheck disable=SC1090
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
VERSION=${VERSION:-2.20.0}
VERSION=${VERSION:-2.21.0}
DEST="${XDG_DATA_HOME}/apps/releases/protoc-grpc-gateway"
BASE_URL=https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v${VERSION}
GRPC_GATEWAY_URL=${BASE_URL}/protoc-gen-grpc-gateway-v${VERSION}-$(get_os)-$(uname -m)

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=go
VERSION=${VERSION:-1.22.4}
VERSION=${VERSION:-1.23.0}
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
URL=https://dl.google.com/go/go${VERSION}.$(get_os)-$(get_arch).tar.gz

@ -5,7 +5,7 @@ set -euo pipefail
# shellcheck disable=SC1090
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
VERSION=${VERSION:-1.22.4}
VERSION=${VERSION:-1.23.0}
DEST=/usr/local/apps/golang
URL=https://dl.google.com/go/go${VERSION}.$(get_os)-$(get_arch).tar.gz
DEST_BIN=$DEST/current/bin

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=golangci-lint
VERSION=${VERSION:-1.59.1}
VERSION=${VERSION:-1.60.1}
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
URL=https://github.com/golangci/golangci-lint/releases/download/v${VERSION}/golangci-lint-${VERSION}-$(get_os)-$(get_arch).tar.gz

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=jira
VERSION=${VERSION:-1.4.0}
VERSION=${VERSION:-1.5.1}
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
main() (

@ -1,4 +1,4 @@
#!/usr/bin/env bash
VERSION=${VERSION:-v1.3.0}
VERSION=${VERSION:-v1.5.1}
go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@${VERSION}"

@ -5,7 +5,7 @@ set -euo pipefail
# shellcheck disable=SC1091
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
VERSION=${VERSION:-27.2}
VERSION=${VERSION:-27.3}
APP=protoc
APPS_DIR=${XDG_DATA_HOME}/apps/releases/${APP}
VER_DIR=${APPS_DIR}/${VERSION}

@ -5,7 +5,7 @@ set -euo pipefail
# shellcheck disable=SC1091
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
PROTOC_VERSION=${VERSION:-27.2}
PROTOC_VERSION=${VERSION:-27.3}
PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip
TMP_DIR=$(mktemp --directory)
DEST_FILE=$TMP_DIR/$PROTOC_ZIP

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=sqlc
VERSION=${VERSION:-1.26.0}
VERSION=${VERSION:-1.27.0}
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://downloads.sqlc.dev/sqlc_${VERSION}_$(get_os)_$(get_arch).tar.gz

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=templ
VERSION=${VERSION:-v0.2.707}
VERSION=${VERSION:-v0.2.747}
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://github.com/a-h/templ/releases/download/${VERSION}/templ_$(uname)_$(uname -m).tar.gz

@ -31,7 +31,7 @@ if [ "${XDG_RUNTIME_DIR}" = "" ]; then
fi
#{{- end }}
env_file () {
_env_file () {
if [ ! -f "${1}" ]; then
return
fi
@ -43,23 +43,13 @@ env_file () {
)"
}
env_file "${XDG_CONFIG_HOME}/user-dirs.dirs"
if [ -d "${XDG_CONFIG_HOME}/profile/env.d" ]; then
for file in "${XDG_CONFIG_HOME}"/profile/env.d/*.env; do
env_file "${file}"
done
unset file
fi
unset env_file
#{{ $home := .chezmoi.homeDir -}}
_env_file "${XDG_CONFIG_HOME}/user-dirs.dirs"
#{{- range $file := (glob (joinPath $home ".config" "profile" "env.d" "*.env")) }}
_env_file "#{{ replace $home "${HOME}" $file }}"
#{{- end }}
if [ -d "${XDG_CONFIG_HOME}/profile/profile.d" ]; then
for file in "${XDG_CONFIG_HOME}"/profile/profile.d/*.sh; do
if [ -r "$file" ]; then
#shellcheck disable=1090
. "$file"
fi
done
unset file
fi
unset _env_file
#{{ range $file := (glob (joinPath $home ".config" "profile" "profile.d" "*.sh")) }}
. "#{{ replace $home "${HOME}" $file }}"
#{{- end }}

@ -1,3 +1,6 @@
# chezmoi:template:left-delimiter=#{{
#{{- /* vim: set filetype=zsh: */ -}}
if [[ -d "${XDG_CONFIG_HOME}/zsh/env.d" ]]; then
for file in "${XDG_CONFIG_HOME}"/zsh/env.d/*.env(N); do
eval "$(
@ -10,14 +13,7 @@ if [[ -d "${XDG_CONFIG_HOME}/zsh/env.d" ]]; then
unset file
fi
if [[ -d "${XDG_CONFIG_HOME}/zsh/zshrc.d" ]]; then
for file in "${XDG_CONFIG_HOME}"/zsh/zshrc.d/*.zsh(N); do
if [ -r "$file" ]; then
#shellcheck disable=1090
source "$file"
fi
done
unset file
fi
# vim: ft=zsh
#{{- $home := .chezmoi.homeDir }}
#{{ range $file := (glob (joinPath $home ".config" "zsh" "zshrc.d" "*.zsh")) }}
source "#{{ replace $home "${HOME}" $file }}"
#{{- end }}
Loading…
Cancel
Save