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 fi
#{{- end }} #{{- end }}
if [ -d "${XDG_CONFIG_HOME}"/bash/bashrc.d ]; then #{{- $home := .chezmoi.homeDir }}
for file in "${XDG_CONFIG_HOME}"/bash/bashrc.d/*.sh; do #{{ range $file := (glob (joinPath $home ".config" "bash" "bashrc.d" "*.sh")) }}
if [ -r "$file" ]; then source "#{{ replace $home "${HOME}" $file }}"
#shellcheck disable=1090 #{{- end }}
source "$file"
fi
done
unset file
fi
if [[ -d "${XDG_CONFIG_HOME}/bash/env.d" ]]; then _env_file () {
for file in "${XDG_CONFIG_HOME}"/bash/env.d/*.env; do if [ ! -f "${1}" ]; then
eval "$( return
grep -v '^\s*\#' "${file}" | fi
grep -v '^\s*$' | eval "$(
sed 's/^\s*export//g' | grep -v '^\s*\#' "${1}" |
sed 's/^/export /g' grep -v '^\s*$' |
)" sed 's/^\s*export//g' |
done sed 's/^/export /g'
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 -}} #{{ end -}}
#{{ if lookPath "direnv" -}} #{{ if lookPath "direnv" -}}
eval "$(direnv hook bash)" source <(direnv hook bash)
#{{ end -}} #{{ end -}}
#{{ if lookPath "erd" -}} #{{ if lookPath "erd" -}}
@ -47,13 +47,11 @@ eval "$(direnv hook bash)"
#{{ end -}} #{{ end -}}
#{{ if lookPath "trubka" -}} #{{ if lookPath "trubka" -}}
eval "$(trubka --completion-script-bash)" source <(trubka --completion-script-bash)
#{{ end -}} #{{ end -}}
#{{ if lookPath "rbenv" -}} #{{ if lookPath "rbenv" -}}
if [ "${RBENV_SHELL}" = "" ]; then source <(rbenv init -)
eval "$(rbenv init -)"
fi
#{{ end -}} #{{ end -}}
#{{ if and (lookPath "rvm") (stat (joinPath .chezmoi.homeDir ".rvm" "bin") ) -}} #{{ if and (lookPath "rvm") (stat (joinPath .chezmoi.homeDir ".rvm" "bin") ) -}}

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

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

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

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

@ -16,7 +16,7 @@ function get_os () (
APP=deno APP=deno
VERSION=${VERSION:-1.44.4} VERSION=${VERSION:-1.45.5}
DEST=${XDG_DATA_HOME}/apps/releases/${APP} DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://github.com/denoland/deno/releases/download/v${VERSION}/deno-$(uname -m)-$(get_os).zip 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" source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=dust APP=dust
VERSION=${VERSION:-1.0.0} VERSION=${VERSION:-1.1.1}
DEST=${XDG_DATA_HOME}/apps/releases/${APP} DEST=${XDG_DATA_HOME}/apps/releases/${APP}
main() ( main() (

@ -5,7 +5,7 @@ set -euo pipefail
# shellcheck disable=SC1090 # shellcheck disable=SC1090
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" 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" DEST="${XDG_DATA_HOME}/apps/releases/protoc-grpc-gateway"
BASE_URL=https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v${VERSION} 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) 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" source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=go APP=go
VERSION=${VERSION:-1.22.4} VERSION=${VERSION:-1.23.0}
DEST="${XDG_DATA_HOME}/apps/releases/${APP}" DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
URL=https://dl.google.com/go/go${VERSION}.$(get_os)-$(get_arch).tar.gz URL=https://dl.google.com/go/go${VERSION}.$(get_os)-$(get_arch).tar.gz

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

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=golangci-lint APP=golangci-lint
VERSION=${VERSION:-1.59.1} VERSION=${VERSION:-1.60.1}
DEST="${XDG_DATA_HOME}/apps/releases/${APP}" 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 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" source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=jira APP=jira
VERSION=${VERSION:-1.4.0} VERSION=${VERSION:-1.5.1}
DEST=${XDG_DATA_HOME}/apps/releases/${APP} DEST=${XDG_DATA_HOME}/apps/releases/${APP}
main() ( main() (

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/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}" go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@${VERSION}"

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

@ -5,7 +5,7 @@ set -euo pipefail
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" 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 PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip
TMP_DIR=$(mktemp --directory) TMP_DIR=$(mktemp --directory)
DEST_FILE=$TMP_DIR/$PROTOC_ZIP DEST_FILE=$TMP_DIR/$PROTOC_ZIP

@ -6,7 +6,7 @@ set -euo pipefail
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh" source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=sqlc APP=sqlc
VERSION=${VERSION:-1.26.0} VERSION=${VERSION:-1.27.0}
DEST=${XDG_DATA_HOME}/apps/releases/${APP} DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://downloads.sqlc.dev/sqlc_${VERSION}_$(get_os)_$(get_arch).tar.gz 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" source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
APP=templ APP=templ
VERSION=${VERSION:-v0.2.707} VERSION=${VERSION:-v0.2.747}
DEST=${XDG_DATA_HOME}/apps/releases/${APP} DEST=${XDG_DATA_HOME}/apps/releases/${APP}
URL=https://github.com/a-h/templ/releases/download/${VERSION}/templ_$(uname)_$(uname -m).tar.gz 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 fi
#{{- end }} #{{- end }}
env_file () { _env_file () {
if [ ! -f "${1}" ]; then if [ ! -f "${1}" ]; then
return return
fi fi
@ -43,23 +43,13 @@ env_file () {
)" )"
} }
env_file "${XDG_CONFIG_HOME}/user-dirs.dirs" #{{ $home := .chezmoi.homeDir -}}
_env_file "${XDG_CONFIG_HOME}/user-dirs.dirs"
if [ -d "${XDG_CONFIG_HOME}/profile/env.d" ]; then #{{- range $file := (glob (joinPath $home ".config" "profile" "env.d" "*.env")) }}
for file in "${XDG_CONFIG_HOME}"/profile/env.d/*.env; do _env_file "#{{ replace $home "${HOME}" $file }}"
env_file "${file}" #{{- end }}
done
unset file
fi
unset env_file
if [ -d "${XDG_CONFIG_HOME}/profile/profile.d" ]; then unset _env_file
for file in "${XDG_CONFIG_HOME}"/profile/profile.d/*.sh; do #{{ range $file := (glob (joinPath $home ".config" "profile" "profile.d" "*.sh")) }}
if [ -r "$file" ]; then . "#{{ replace $home "${HOME}" $file }}"
#shellcheck disable=1090 #{{- end }}
. "$file"
fi
done
unset file
fi

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