mirror of
https://github.com/MillironX/dotfiles.git
synced 2024-11-21 13:16:04 +00:00
feat: Replace shell execution with shell variable
This commit is contained in:
parent
63d5bfcd6f
commit
791f4ae7b7
3 changed files with 7 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
|
# shellcheck shell=sh
|
||||||
# >>> conda initialize >>>
|
# >>> conda initialize >>>
|
||||||
# !! Contents within this block are managed by 'conda init' !!
|
# !! Contents within this block are managed by 'conda init' !!
|
||||||
__conda_setup="$($HOME/miniconda3/bin/conda shell.$(basename $(readlink -f /proc/$$/exe)) 'hook' 2> /dev/null)"
|
__conda_setup="$($HOME/miniconda3/bin/conda shell.$SH 'hook' 2> /dev/null)"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
eval "$__conda_setup"
|
eval "$__conda_setup"
|
||||||
else
|
else
|
||||||
|
@ -18,7 +19,7 @@ fi
|
||||||
# <<< conda initialize <<<
|
# <<< conda initialize <<<
|
||||||
|
|
||||||
{{- if lookPath "direnv" }}
|
{{- if lookPath "direnv" }}
|
||||||
eval "$(direnv hook $(basename $(readlink -f /proc/$$/exe)))"
|
eval "$(direnv hook $SH)"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
if [ -f $HOME/.ion/bin/ion ]; then
|
if [ -f $HOME/.ion/bin/ion ]; then
|
||||||
|
@ -27,8 +28,8 @@ if [ -f $HOME/.ion/bin/ion ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Import GNU parallel
|
# Import GNU parallel
|
||||||
if [ $(command -v env_parallel.$(basename $(readlink -f /proc/$$/exe))) ]; then
|
if [ $(command -v env_parallel.$SH) ]; then
|
||||||
source $(which env_parallel.$(basename $(readlink -f /proc/$$/exe)))
|
source $(which env_parallel.$SH)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{{- if eq .machinetype "workstation" }}
|
{{- if eq .machinetype "workstation" }}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# .bashrc
|
# .bashrc
|
||||||
|
export SH=bash
|
||||||
|
|
||||||
if [ -f "$HOME/.modules" ]; then
|
if [ -f "$HOME/.modules" ]; then
|
||||||
source $HOME/.modules
|
source $HOME/.modules
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
export SH=zsh
|
||||||
{{- if eq .chezmoi.os "linux" }}
|
{{- if eq .chezmoi.os "linux" }}
|
||||||
{{- if or
|
{{- if or
|
||||||
(eq .machinetype "workstation")
|
(eq .machinetype "workstation")
|
||||||
|
|
Loading…
Reference in a new issue