Skip to content

Commit

Permalink
updating script
Browse files Browse the repository at this point in the history
  • Loading branch information
ap0calypse644 committed Dec 20, 2024
1 parent 2cc93ea commit f298975
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions priv_gov_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ if [[ "${BASH_VERSINFO[0]}" -lt 4 ]]; then
exit 1
fi

# Required Go version
REQUIRED_GO_VERSION="1.22.10"

# Get the installed Go version
INSTALLED_GO_VERSION=$(go version | awk '{print $3}' | sed 's/go//')

# Check if the installed Go version matches the required version
if [ "$INSTALLED_GO_VERSION" != "$REQUIRED_GO_VERSION" ]; then
echo "ERROR: Go version $REQUIRED_GO_VERSION is required. Installed version: $INSTALLED_GO_VERSION."
exit 1
else
echo "Go version $INSTALLED_GO_VERSION is meets requirement."
fi
# Proceed with the rest of your script

# Function to ask for user confirmation
ask_user() {
read -p "Directory $dir_path already exists. Do you want to continue? [y/N]: " decision
Expand Down

0 comments on commit f298975

Please sign in to comment.