diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-07-07 13:48:08 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-07-07 13:48:08 -0300 |
commit | 22bd3a532dbb21085fa35eecf7a1edd92bd22fc4 (patch) | |
tree | 4ebaae89c41450fbb457b44e465d47f39a1c2333 /share/hoarder/pyenv/unix/linux/debian/install | |
parent | ea3015dea04a3cdebd411313f84d802474456bc1 (diff) | |
download | trashman-22bd3a532dbb21085fa35eecf7a1edd92bd22fc4.tar.gz trashman-22bd3a532dbb21085fa35eecf7a1edd92bd22fc4.tar.bz2 |
Fix: hoarder: pyenv: install shell initialization scripts with profile.d scheme is used
Diffstat (limited to 'share/hoarder/pyenv/unix/linux/debian/install')
-rwxr-xr-x | share/hoarder/pyenv/unix/linux/debian/install | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/share/hoarder/pyenv/unix/linux/debian/install b/share/hoarder/pyenv/unix/linux/debian/install new file mode 100755 index 0000000..020987a --- /dev/null +++ b/share/hoarder/pyenv/unix/linux/debian/install @@ -0,0 +1,47 @@ +#!/usr/bin/env sh +# +# Install pyenv +# https://github.com/pyenv/pyenv +# + +# Parameters +SHARE="$1" +LIB="$2" + +# Include basic functions +. $LIB/trashman/functions || exit 1 +. $LIB/trashman/debian || exit 1 + +# Requirements for getting pyenv +trashman_apt_install git + +# Requirements for compiling python +trashman_apt_install apt-get make build-essential libssl-dev zlib1g-dev \ + libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ + libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev + +# Setup pyenv from installer script +#mkdir -p $HOME/.local/bin $HOME/.local/share +#cd $HOME/.local/bin +#wget https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer +#chmod +x pyenv-installer +#./pyenv-installer + +# Setup pyenv by cloning it's repository +if [ ! -d "$HOME/.pyenv" ]; then + git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv +else + ( cd $HOME/.pyenv && git pull ) +fi + +# Setup the initialization script the $HOME/.profile.d folder scheme is used +if [ -d "$HOME/.profile.d" ]; then + cp $SHARE/pyenv/unix/linux/debian/files/profile.sh $HOME/.profile.d/pyenv +else + echo "Please configure your shell initialization script according to the PyEnv documentation" + echo "See https://github.com/pyenv/pyenv for details" +fi + +# Inform +trashman_installed_at $HOME/.pyenv +trashman_run_with $HOME/.pyenv/bin/pyenv |