]> gitweb.fluxo.info Git - trashman.git/commitdiff
Feat: adds hoarder/pyenv
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 28 Nov 2020 19:03:54 +0000 (16:03 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 28 Nov 2020 19:03:54 +0000 (16:03 -0300)
share/hoarder/grab-site/unix/linux/debian/install
share/hoarder/pyenv/info [new file with mode: 0644]
share/hoarder/pyenv/unix/install [new file with mode: 0755]

index be9c0748699345cf480806c410008a6a6e6b9073..a67961ff03e88c2ed1b9d199d7abc36c77af545b 100755 (executable)
@@ -14,16 +14,17 @@ LIB="$2"
 # Requirements
 trashman_apt_install_packages git build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev libxml2-dev libxslt1-dev libre2-dev pkg-config
 
-# Setup pyenv and grab-site
-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
-$HOME/.pyenv/bin/pyenv install 3.7.0
-$HOME/.pyenv/versions/3.7.0/bin/python -m venv $HOME/.local/share/gs-venv
-$HOME/.local/share/gs-venv/bin/pip install --process-dependency-links --no-binary --upgrade git+https://github.com/ludios/grab-site
+# Install pyenv
+hoarder install pyenv || exit 1
+
+# Install python and create venv
+mkdir -p $HOME/.local/share
+$HOME/.pyenv/bin/pyenv install 3.7.8 || exit 1
+$HOME/.pyenv/versions/3.7.8/bin/python -m venv $HOME/.local/share/grab-site-venv || exit 1
+
+# Install grab-site
+$HOME/.local/share/grab-site-venv/bin/pip install --no-binary lxml --upgrade git+https://github.com/ArchiveTeam/grab-site || exit 1
 
 echo "Add this to your ~/.bashrc or ~/.zshrc and then restart your shell (e.g. by opening a new terminal tab/window):"
 echo ""
-echo 'PATH="$PATH:'$HOME/.local/share/gs-venv/bin'"'
+echo 'PATH="$PATH:'$HOME/.local/share/grab-site-venv/bin'"'
diff --git a/share/hoarder/pyenv/info b/share/hoarder/pyenv/info
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/share/hoarder/pyenv/unix/install b/share/hoarder/pyenv/unix/install
new file mode 100755 (executable)
index 0000000..b1b0579
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/env sh
+#
+# Install grab-site
+#
+
+# Parameters
+SHARE="$1"
+LIB="$2"
+
+# Include basic functions
+. $LIB/trashman/functions || exit 1
+. $LIB/trashman/debian    || exit 1
+
+# Requirements
+trashman_apt_install_packages git
+
+# 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