aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-07-07 13:48:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-07-07 13:48:57 -0300
commit1da26f11efa5416d9a79aa82852ed07a9a92e58a (patch)
tree59d7b518f788d93943c980f7fd4158cd719312d9
parentd43e325b1fed5d8b8cfaba75ba9bb7e4ee02254c (diff)
downloadprofile-1da26f11efa5416d9a79aa82852ed07a9a92e58a.tar.gz
profile-1da26f11efa5416d9a79aa82852ed07a9a92e58a.tar.bz2
Fix: move PyEnv initialization to trashman/hoarder and enable the .profile.d folder scheme
-rw-r--r--profile.dot.link80
1 files changed, 15 insertions, 65 deletions
diff --git a/profile.dot.link b/profile.dot.link
index 9c1ff41..c4f518c 100644
--- a/profile.dot.link
+++ b/profile.dot.link
@@ -130,44 +130,6 @@ fi
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
-# PyEnv
-# https://github.com/pyenv/pyenv
-if [ -d "$HOME/.pyenv" ]; then
- export PYENV_ROOT="$HOME/.pyenv"
- command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
-
- PATH="$(bash --norc -ec 'IFS=:; paths=($PATH); for i in ${!paths[@]}; do if [[ ${paths[i]} == "'$HOME/.pyenv/shims'" ]]; then unset '\''paths[i]'\''; fi; done; echo "${paths[*]}"')"
- PATH="$HOME/.pyenv/shims:${PATH}"
-
- if [ "$0" = "bash" ]; then
- export PYENV_SHELL=bash
- source '$HOME/.pyenv/libexec/../completions/pyenv.bash'
- elif [ "$0" = "bash" ]; then
- export PYENV_SHELL=zsh
- source '$HOME/.pyenv/libexec/../completions/pyenv.zsh'
- fi
-
- command pyenv rehash 2>/dev/null
-
- pyenv() {
- local command
- command="${1:-}"
-
- if [ "$#" -gt 0 ]; then
- shift
- fi
-
- case "$command" in
- rehash|shell)
- eval "$(pyenv "sh-$command" "$@")"
- ;;
- *)
- command pyenv "$command" "$@"
- ;;
- esac
- }
-fi
-
# Export PATH
export PATH=$PATH
@@ -390,18 +352,6 @@ if [ -e "$HOME/apps/python" ]; then
fi
fi
-# Pyenv
-if [ -e "$HOME/.pyenv/bin/pyenv" ]; then
- export PYENV_ROOT="$HOME/.pyenv"
- export PATH="$PYENV_ROOT/bin:$PATH"
-
- #if command -v pyenv 1> /dev/null 2>&1; then
- if [ -e "$HOME/.pyenv/bin/pyenv" ]; then
- #eval "$(pyenv init -)"
- eval "$($HOME/.pyenv/bin/pyenv init -)"
- fi
-fi
-
# Start the powerline daemon
# See http://powerline.readthedocs.io/en/master/usage/shell-prompts.html
if [ -x "/usr/bin/powerline-daemon" ]; then
@@ -444,22 +394,22 @@ fi
cd $STARTUP_FOLDER
# Include other profiles
-#if [ -d "$HOME/.profile.d" ]; then
-# scripts="`find $HOME/.profile.d -type f`"
-#
-# for script in $scripts; do
-# source $script
-# done
-#fi
+if [ -d "$HOME/.profile.d" ]; then
+ scripts="`find $HOME/.profile.d -type f`"
-# Include custom profiles
-#if [ -d "$HOME/.custom/profile.d" ]; then
-# scripts="`find $HOME/.custom/profile.d -type f`"
-#
-# for script in $scripts; do
-# source $script
-# done
-#fi
+ for script in $scripts; do
+ source $script
+ done
+fi
+
+ Include custom profiles
+if [ -d "$HOME/.custom/profile.d" ]; then
+ scripts="`find $HOME/.custom/profile.d -type f`"
+
+ for script in $scripts; do
+ source $script
+ done
+fi
# Run startup scripts
#if [ -d "$HOME/.custom/rc.d" ]; then