diff --git a/install_postgres.sh b/install_postgres.sh new file mode 100755 index 0000000..e998f21 --- /dev/null +++ b/install_postgres.sh @@ -0,0 +1,12 @@ +# Create the file repository configuration: +sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + +# Import the repository signing key: +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - + +# Update the package lists: +sudo apt-get update + +# Install the latest version of PostgreSQL. +# If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql': +sudo apt-get -y install postgresql diff --git a/install_python3.sh b/install_python3.sh new file mode 100755 index 0000000..d280195 --- /dev/null +++ b/install_python3.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Update the package list +sudo apt-get update + +# Install the software-properties-common package +sudo apt-get install software-properties-common + +# Add the deadsnakes PPA to the sources list +sudo add-apt-repository ppa:deadsnakes/ppa + +# Update the package list again +sudo apt-get update + +# Check the latest version of Python 3 available +latest_version=$(apt-cache madison python3 | awk '{print $3}' | grep "^3\." | sort -V | tail -1) + +# Install the latest version of Python 3 +sudo apt-get install -y python3=$latest_version + +# Verify the installation +python3 --version +which python3 + diff --git a/setup.sh b/setup.sh index b1aaef9..62d1991 100755 --- a/setup.sh +++ b/setup.sh @@ -184,3 +184,14 @@ while true; do esac done +while true; do + read -p "do you want to install fzf, ripgrep?" yn + case $yn in + [Yy]* ) + sudo apt-get install fzf ripgrep + break;; + [Nn]* ) + break;; + * ) echo "Please answer yes or no.";; + esac +done