Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if user wants to run make postgres-on-linux #6819

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/twenty-postgres/linux/provision-postgres-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ handle_error () {
exit 1
}

read -r "This script uses sudo to install postgresql, curl and change different settings, do you want to run this script? [y/N]" AGREEMENT
BOHEUS marked this conversation as resolved.
Show resolved Hide resolved

if [ "$AGREEMENT" != "y" ] || [ "$AGREEMENT" != "Y" ] ; then
BOHEUS marked this conversation as resolved.
Show resolved Hide resolved
exit 1
fi
BOHEUS marked this conversation as resolved.
Show resolved Hide resolved

cat << "EOF"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@#*+=================@@@@@%*+=========++*%@@@@@@@
Expand Down Expand Up @@ -56,7 +62,7 @@ echo_header $GREEN "Step [1/4]: Installing PostgreSQL..."
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
sudo apt update -y || handle_error "Failed to update package list."
sudo apt install -y postgresql-$PG_MAIN_VERSION postgresql-contrib-$PG_MAIN_VERSION || handle_error "Failed to install PostgreSQL."su
sudo apt install -y postgresql-$PG_MAIN_VERSION postgresql-contrib-$PG_MAIN_VERSION || handle_error "Failed to install PostgreSQL."
sudo apt install -y curl || handle_error "Failed to install curl."

# Install pg_graphql extensions
Expand Down
Loading