mirror of
https://github.com/MillironX/dotfiles.git
synced 2024-12-11 21:01:58 +00:00
fix: Replace $0 with more robust shell checker
This commit is contained in:
parent
44b9b80d27
commit
be48c89689
1 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
# >>> 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 $0) 'hook' 2> /dev/null)"
|
__conda_setup="$($HOME/miniconda3/bin/conda shell.$(basename $(readlink -f /proc/$$/exe)) 'hook' 2> /dev/null)"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
eval "$__conda_setup"
|
eval "$__conda_setup"
|
||||||
else
|
else
|
||||||
|
@ -18,7 +18,7 @@ fi
|
||||||
# <<< conda initialize <<<
|
# <<< conda initialize <<<
|
||||||
|
|
||||||
{{- if lookPath "direnv" }}
|
{{- if lookPath "direnv" }}
|
||||||
eval "$(direnv hook $(basename $0))"
|
eval "$(direnv hook $(basename $(readlink -f /proc/$$/exe)))"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
if [ -f $HOME/.ion/bin/ion ]; then
|
if [ -f $HOME/.ion/bin/ion ]; then
|
||||||
|
@ -27,8 +27,8 @@ if [ -f $HOME/.ion/bin/ion ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Import GNU parallel
|
# Import GNU parallel
|
||||||
if [ $(command -v env_parallel.$(basename $0)) ]; then
|
if [ $(command -v env_parallel.$(basename $(readlink -f /proc/$$/exe))) ]; then
|
||||||
source $(which env_parallel.$(basename $0))
|
source $(which env_parallel.$(basename $(readlink -f /proc/$$/exe)))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{{- if eq .machinetype "workstation" }}
|
{{- if eq .machinetype "workstation" }}
|
||||||
|
|
Loading…
Reference in a new issue