From f713ce83e0310d859a81d5a4a2368cea25bca81c Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 4 Dec 2020 14:50:03 +0000 Subject: added a couple of new scripts --- compile_python_debian.sh | 41 +++++++++++++++++++++++++++++++++++++++++ duck | 3 +++ 2 files changed, 44 insertions(+) create mode 100755 compile_python_debian.sh create mode 100755 duck diff --git a/compile_python_debian.sh b/compile_python_debian.sh new file mode 100755 index 0000000..c3dcf1b --- /dev/null +++ b/compile_python_debian.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +## run like this: ./compile_python_debian.sh 3.8.1 3.8.1 (for example) + +PYTHON_VERSION=$1 +PYTHON_RELEASE=$2 + +echo "Updating system...." +sudo apt update +sudo apt upgrade +sudo apt-get install -y make build-essential libssl-dev zlib1g-dev +sudo apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm +sudo apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-dev + +cd $HOME/Downloads + +wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_RELEASE.tar.xz + +DIR="$HOME/.python$PYTHON_RELEASE" + +if [ -d $DIR ] +then + echo "$0: directory '$DIR' exists." + echo "Not overwriting existing Python installation. Exiting." + exit 1 +else + echo "Creating $DIR..." + mkdir $DIR +fi + +tar -xvf Python-$PYTHON_RELEASE.tar.xz +cd Python-$PYTHON_RELEASE +#e we set LDFLAGS pointing to install directory if system does not have libpython3.6 Here we set LDFLAGS pointing to install directory if system does not have libpython3.6 +./configure --prefix="$DIR" LDFLAGS="-Wl,--rpath=$DIR/lib" +#./configure --prefix="$DIR" --enabled-shared LDFLAGS="-Wl,--rpath=$DIR/lib" +make +make install +cd ~ +rm -rf $HOME/Downloads/Python-$PYTHON_RELEASE +rm $HOME/Downloads/Python-$PYTHON_RELEASE.tar.xz +echo "Done...!" diff --git a/duck b/duck new file mode 100755 index 0000000..90410d4 --- /dev/null +++ b/duck @@ -0,0 +1,3 @@ +#!/bin/sh +/home/lemon/dotfiles/lynx/lynx "duckduckgo.com/lite?kd=-1&kp=-1&q=$*" +#lynx "duckduckgo.com/lite?q=$*" -- cgit v1.2.3