Skip to content

Commit

Permalink
required_version="9.3.8"
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Aug 22, 2024
1 parent 5a73c1a commit 018ee85
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions INSTALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ install_or_update_swipl() {
#sudo apt-get remove -y swi-prolog??*
#sudo apt-get install -y swi-prolog
swi_prolog_version=$(swipl_version)
required_version="9.1"
required_version="9.3.8"
if version_ge $swi_prolog_version $required_version; then
echo -e "${GREEN}SWI-Prolog version $swi_prolog_version is installed and meets the required version $required_version or higher.${NC}"
else
Expand All @@ -196,17 +196,17 @@ install_or_update_swipl() {

}

# Check if SWI-Prolog is installed
if ! command -v swipl &> /dev/null; then
if confirm_with_default "Y" "SWI-Prolog is not installed. Would you like to install it?"; then
# Check if SWI-Prolog is installed with Janus
if ! command -v swipl &> /dev/null || ! swipl -g "use_module(library(janus)), halt(0)." -t "halt(1)" 2>/dev/null; then
if confirm_with_default "Y" "SWI-Prolog is not installed with Janus support. Would you like to install it?"; then
install_or_update_swipl
else
echo -e "${RED}SWI-Prolog installation aborted. Exiting script${NC}."
exit 1
fi
else
swi_prolog_version=$(swipl_version)
required_version="9.1"
required_version="9.3.8"
if version_ge $swi_prolog_version $required_version; then
echo -e "${GREEN}SWI-Prolog version $swi_prolog_version is installed and meets the required version $required_version or higher.${NC}"
else
Expand Down Expand Up @@ -239,7 +239,7 @@ function ensure_pip() {
}


# Assuming SWI-Prolog 9.1 is installed successfully
# Assuming SWI-Prolog 9.3.9 is installed successfully
# Install Janus for SWI-Prolog
echo -e "${BLUE}Checking if Janus Python support is already installed${NC}..."
if ! swipl -g "use_module(library(janus)), halt(0)." -t "halt(1)" 2>/dev/null; then
Expand Down

0 comments on commit 018ee85

Please sign in to comment.